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': { 'pie': {
'show': true, 'show': true,
'innerRadius': 0.5, 'innerRadius': 0.5,
'radius': 1, 'radius': .8,
'tilt': .5,
'label': { 'label': {
'show': true, 'show': true,
'radius': 3/4,
'background': {
'opacity': 0.5,
'color': '#000000',
},
'formatter': function (label, series) { 'formatter': function (label, series) {
return '<div class="cats-chart-label">' + label + '<br/>' + return '<div class="cats-chart-label">' + label + '<br/><span>' +
Math.round(series.percent) + '%</div>'; Math.round(series.percent) + '% - '+series.data[0][1].toFixed(2)+'€</span></div>';
} }
} }
} }

View file

@ -150,6 +150,11 @@ span.cat-color {
border-radius: 3px; border-radius: 3px;
opacity: 0.6; opacity: 0.6;
text-align: center; text-align: center;
font-size: 0.8em;
}
.cats-chart-label span {
font-size: 0.7em;
} }
</style> </style>
<body> <body>