HumbleSoftware / Flotr2

Graphs and Charts for Canvas in JavaScript.
http://www.humblesoftware.com/flotr2/
MIT License
2.45k stars 528 forks source link

can I draw a pie with unknown number of pieces? #185

Closed lilymini closed 11 years ago

lilymini commented 11 years ago

i want draw a pie, but the number of pieces is dynamic, 2 pieces or 3 or 4. the pie sample below can't work out . is there any way that i can put arrays in data and labels? Thank you

... graph = Flotr.draw(container, [{ data: d1, label: 'lable1' }, { data: d2, label: 'label2' }, { data: dN, // the END is Dynamic, how can i handle this? label: .... },

cesutherland commented 11 years ago

Please post questions to the Flotr2 google group: https://groups.google.com/forum/?fromgroups#!forum/flotr2