Original author: zengge1...@gmail.com (August 08, 2012 06:40:51)
in line chart ,update data can only invoke setData.but in pie chart,
must init chart again.
in pie chart,use variable processed to mark chart has processed the data,when setData,the method processDatapoints will not execute.
so ,I think you can set processed=false in draw of pie.
Original issue: http://code.google.com/p/flot/issues/detail?id=731
Is there a workaround to use setData ? The pie is not drawing.
I tried playing with "processed" and hooks but my comprehension of the code is limited and it did nothing.
A work-around for many situations is to simply call $.plot with your new data.
Thanks, it's that simple and it works. Will do for now.
Doesn't seem very efficient though :)
Set processed back to false after processing.
This temporary fix addresses the problem described in #810, and possibly
#945, where calls to setData for a pie chart do nothing.
This is now fixed in master, by setting processed back to false after all series have been processed, as suggested.
The processed flag is quite a hack, but is necessary due to the fact that Flot provides no other way for plugins to alter the list of series. When we address this in 0.9 we should be able to get rid of the variable entirely.