Skip to content


Pie chart can't setData #810

dnschnur opened this Issue · 4 comments

2 participants


Original author: (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:


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 :)

@dnschnur dnschnur was assigned
@dnschnur dnschnur referenced this issue from a commit
@dnschnur dnschnur 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.

@dnschnur dnschnur closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.