Flot 0.7-could not draw pie with labels contained inside canvas

1,255 views
Skip to first unread message

vani

unread,
May 26, 2011, 1:09:58 AM5/26/11
to Flot graphs
Hi,
I just changed flot 0.6 to 0.7 and am not getting pie chart which was
able to draw when it was flot 0.6.Is there any change in 0.7 in case
of pie chart?

Thanks,
Vani

Ole Laursen

unread,
Jun 3, 2011, 12:13:18 PM6/3/11
to flot-...@googlegroups.com
2011/5/26 vani <kalai....@gmail.com>:

> I just changed flot 0.6 to 0.7 and am not getting pie chart which was
> able to draw when it was flot 0.6.Is there any change in 0.7 in case
> of pie chart?

Hi!

i don't think there was an official pie chart plugin in 0.6.

But anyway since merging it there have been a couple of bug fixes, but
the guy who did the plugin has since then disappeared, so no bigger
changes. We actually need a new maintainer for it. I've merged some
bugfixes, but it could need a little bit of love to fix some things.


Ole

Geoffrey Lalloue

unread,
May 22, 2012, 1:18:43 PM5/22/12
to flot-...@googlegroups.com
This is an old post and maybe there is an answer to my question since the original message is written but ...

The same message appear when i use the pie chart plugin with Flot 0.7 : "could not draw pie with labels contained inside canvas".

I found this information about it in stackoverflow forum :

"The code makes sure that the legend/labels stays within the boundaries of the canvas, and if it doesn't it fails as you have seen. Your options are:

  1. Make your canvas bigger
  2. Make your labels shorter
  3. Use a legend outside of the canvas using the legend.container option to specify an outside div"
But, i don't want to make my canvas bigger and i don't want to truncate my labels.
Maybe the solution is the answer 3, but i think it's complicated just to make it working.

So, my question is : Why can we not set the var "redrawAttempts" to the value 30 to replace the value 10 in the pie chart source ?
I tried it and the generation of the chart still works.It could correct for many of us the problem before to add a option to change this value in the plugin.

Thanks.

Geoffrey


Reply all
Reply to author
Forward
0 new messages