Improve chart
Benjamin Renard

Benjamin Renard commited on 2014-07-23 00:38:17
Showing 2 changed files, with 9 additions and 8 deletions.

... ...
@@ -223,17 +223,13 @@ refresh_group_categories=function(group) {
223 223
         'pie': {
224 224
             'show': true,
225 225
             'innerRadius': 0.5,
226
-            'radius': 1,
226
+            'radius': .8,
227
+            'tilt': .5,
227 228
             'label': {
228 229
                 'show': true,
229
-                'radius': 3/4,
230
-                'background': {
231
-                    'opacity': 0.5,
232
-                    'color': '#000000',
233
-                },
234 230
                 'formatter': function (label, series) {
235
-return '<div class="cats-chart-label">' + label + '<br/>' +   
236
-                            Math.round(series.percent) + '%</div>';
231
+return '<div class="cats-chart-label">' + label + '<br/><span>' +   
232
+                            Math.round(series.percent) + '% - '+series.data[0][1].toFixed(2)+'€</span></div>';
237 233
                 }
238 234
             }
239 235
         }
... ...
@@ -150,6 +150,11 @@ span.cat-color {
150 150
   border-radius: 3px;
151 151
   opacity: 0.6;
152 152
   text-align: center;
153
+  font-size: 0.8em;
154
+}
155
+
156
+.cats-chart-label span {
157
+  font-size: 0.7em;
153 158
 }
154 159
 </style>
155 160
   <body>
156 161