From f149b98cd3b6d27b177ae246882c9d1b69bc17da Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 23 Jul 2014 02:38:17 +0200 Subject: [PATCH] Improve chart --- inc/myco.js | 12 ++++-------- index.html | 5 +++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/inc/myco.js b/inc/myco.js index f8890af..83a0d3f 100644 --- a/inc/myco.js +++ b/inc/myco.js @@ -223,17 +223,13 @@ refresh_group_categories=function(group) { 'pie': { 'show': true, 'innerRadius': 0.5, - 'radius': 1, + 'radius': .8, + 'tilt': .5, 'label': { 'show': true, - 'radius': 3/4, - 'background': { - 'opacity': 0.5, - 'color': '#000000', - }, 'formatter': function (label, series) { -return '
' + label + '
' + - Math.round(series.percent) + '%
'; +return '
' + label + '
' + + Math.round(series.percent) + '% - '+series.data[0][1].toFixed(2)+'€
'; } } } diff --git a/index.html b/index.html index 215faf3..d81fdf3 100644 --- a/index.html +++ b/index.html @@ -150,6 +150,11 @@ span.cat-color { border-radius: 3px; opacity: 0.6; text-align: center; + font-size: 0.8em; +} + +.cats-chart-label span { + font-size: 0.7em; }