Improve chart

This commit is contained in:
Benjamin Renard 2014-07-23 02:38:17 +02:00
parent 8941aab2c6
commit f149b98cd3
2 changed files with 9 additions and 8 deletions

View file

@ -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 '<div class="cats-chart-label">' + label + '<br/>' +
Math.round(series.percent) + '%</div>';
return '<div class="cats-chart-label">' + label + '<br/><span>' +
Math.round(series.percent) + '% - '+series.data[0][1].toFixed(2)+'€</span></div>';
}
}
}

View file

@ -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;
}
</style>
<body>