ShiboBrady / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Pie chart redraw on resize and update data #577

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I am using the pie chart plugin of jquery flot and I faced a problem when 
trying to resize the pie or to update the data (setData, setupGrid, then draw). 
It worked well with other charts (column, bar, line, stacked) but not with pie.

I have modified a bit the plugin to make it possible (My concern was not to 
change a lot the current code, although I think we could imagine a more 
efficient way to do it in exchange for which we would modify the current 
architecture of the plugin). I have attached the modified js file, and my tiny 
modifications (2 in that case) are surrounded by comments such as : 
/*Modification : explanation*/
... modifications ...
/*End Modification*/

Could you either integrate it for next release or do your own trick to make pie 
chart resizeable and update data compatible as other charts ?

Thanks
Julien

Original issue reported on code.google.com by juli1....@gmail.com on 26 Jul 2011 at 1:25

GoogleCodeExporter commented 8 years ago
I add another modification, to clear the overlay after the user had highlight a 
pie slice.

Original comment by juli1....@gmail.com on 26 Jul 2011 at 3:38

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for this Julien. I was having problems with the pie charts (or donut 
charts in my case) not redrawing after setData. I used your code and now it 
works properly. Hopefully this gets patched into the main source tree. 

Original comment by sirom...@gmail.com on 3 Aug 2011 at 6:11

GoogleCodeExporter commented 8 years ago

Original comment by dnsch...@gmail.com on 7 May 2012 at 5:48

GoogleCodeExporter commented 8 years ago
Thank you!

Original comment by synequ...@gmail.com on 18 Jun 2012 at 5:03

GoogleCodeExporter commented 8 years ago
Thank you!  I finally could redraw new data on the same pie chart with the fix 
you've just mentioned. Thx!

Original comment by justjoes...@gmail.com on 4 Nov 2012 at 11:15

GoogleCodeExporter commented 8 years ago
Thanks a lot......

Original comment by sije...@gmail.com on 7 Feb 2013 at 2:59

GoogleCodeExporter commented 8 years ago
This is brilliant, Thanks.

Original comment by Helloca...@gmail.com on 28 May 2013 at 9:31

GoogleCodeExporter commented 8 years ago
Thanks a Lot! It helps for me, when i resize a window

Original comment by balaj...@symbiosystech.com on 20 Nov 2014 at 4:14