Labels not appearing in Pie Chart

28 views
Skip to first unread message

TheInnovator

unread,
May 22, 2014, 1:19:07 PM5/22/14
to google-visua...@googlegroups.com
Pleas see the following site:
Enter 10/2013 for this month and 01/2014 for last month

My labels are not appearing with the associated line.

Any ideas?

Andrew Gallant

unread,
May 22, 2014, 1:35:33 PM5/22/14
to google-visua...@googlegroups.com
I suspect the roblem is in your PieChart options:

var PieOptionAuto = {
    pieSliceText: 'value',
    is3D: false,
    legend: {
        position: 'labeled'
    },
    width: 350,
    height: 350,
    chartArea: {
        height: '85%',
        width: '90%'
    },
    pieStartAngle: 90
};

By setting the chartArea height and width to such a large proportion of the total chart size, you eliminate all of the space for the labels.  In HTML, you specify a width of 700 for the chart div.  Perhaps something like this would be more appropriate for your chart options?:

var PieOptionAuto = {
    pieSliceText: 'value',
    is3D: false,
    legend: {
        position: 'labeled'
    },
 
// use the width specified in HTML
//width: 350, height: 350, chartArea: { height: '85%' // specifying height here should be sufficient }, pieStartAngle: 90 };

Isaac Sogunro

unread,
May 22, 2014, 1:47:00 PM5/22/14
to google-visua...@googlegroups.com
That did not work.


--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/yqi3oP1Wbfk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.



--
-Isaac-

http://twitter.com/#!/feedy0urmind
You are today where your thoughts have brought you; you will be tomorrow where your thoughts take you.
- James Allen

Isaac Sogunro

unread,
May 22, 2014, 1:48:22 PM5/22/14
to google-visua...@googlegroups.com
The weird thing is that the very first time I created and ran the chart, the labels showed.  Now it doesn't, even after opening a new browser.

Andrew Gallant

unread,
May 22, 2014, 3:23:45 PM5/22/14
to google-visua...@googlegroups.com
What happens if you comment out the chartArea option entirely?
That did not work.


To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
--
-Isaac-

http://twitter.com/#!/feedy0urmind
You are today where your thoughts have brought you; you will be tomorrow where your thoughts take you.
- James Allen

Andrew Gallant

unread,
May 22, 2014, 3:30:14 PM5/22/14
to google-visua...@googlegroups.com
After testing, I determined that the legend labels are drawn inside the chartArea, so you actually should set the chartArea.width option.

Isaac Sogunro

unread,
May 22, 2014, 10:24:53 PM5/22/14
to google-visua...@googlegroups.com
That worked. Thanks!


To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages