Closed GoogleCodeExporter closed 8 years ago
Yes, each slice is a series, so that it can have a color and a legend entry.
Get inspiration from the basic-pie.html example.
Flotr.draw($('container'), [
{data: [[0, 5]], label: 'Comedy'},
{data: [[0, 1.2]], label: 'Action'},
{data: [[0, 3]], label: 'Romance'},
{data: [[0, 1]], label: 'Drama'}
], {
xaxis: {showLabels: false},
yaxis: {showLabels: false},
pie: {
show: true
}
});
It means: Comedy=5, Action=1.2, Romance=3, Drama=1.
Note that each data is an array with only one entry which is an array with two
entries : 0 on the first key and the value on the second.
Original comment by fabien.menager
on 16 Jul 2010 at 7:25
Original issue reported on code.google.com by
prw...@gmail.com
on 14 Feb 2010 at 2:33