Pie Chart, wrapping legend labels

3,209 views
Skip to first unread message

FARHAN INAMDAR

unread,
Oct 12, 2016, 2:25:11 AM10/12/16
to Google Visualization API

Hi, 

I have been trying to wrap the legend labels for quite some time with no success. Could someone please help me with the same?
Is there a property to manipulate the legend width that I can use?

Please find the link to sample js fiddle: https://jsfiddle.net/ak8wqt6f/

Regards,
Farhan

Daniel LaLiberte

unread,
Oct 13, 2016, 10:36:43 AM10/13/16
to Google Visualization API
The PieChart does things a little differently regarding the chartArea width because it includes the legend in the width.  

The main problem in your example is that you have set the container element width which overrides whatever you might set in the options.  Your options were also a bit mixed up.  Here is an example using the new 'chartArea.right' option to specify a small value to the right of the chart, thus leaving a larger area for the chart and the legend.  https://jsfiddle.net/ak8wqt6f/3/

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/1fe9bbd0-1936-404d-88fc-e36fc26f1665%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages