Legend and x-axis label not displaying in a proper format.

172 views
Skip to first unread message

Veer Bhupendra singh

unread,
Oct 28, 2013, 5:40:09 AM10/28/13
to google-visua...@googlegroups.com

I have defined a div with fixed height and width and displaying my chart in it.
The issue I am facing is the legend and x-axis labels are not displaying there full values(marked with red in the image).

How to resolve it..?
Any reply is highly appreciated.
Thanks

asgallant

unread,
Oct 28, 2013, 9:19:09 AM10/28/13
to google-visua...@googlegroups.com
You will need to play around with the chartArea option to give the legend and axis labels more space to draw (the chart area is the space where the bars are drawn).  The chartArea option has 4 sub-options: top, left, width, and height.  Top and left position the top edge and left edge of the chart area relative to the container's top and left edges.  Width and height set the width and height of the chart area.  These options can take either a number representing the distance in pixels or a percent representing the percent of the total width of the chart.  Set the chartArea options like this:

chartArea: {
    height: '65%',
    width: '70%',
    top: 15,
    left: 30
}

Veer Bhupendra singh

unread,
Oct 28, 2013, 11:01:28 PM10/28/13
to google-visua...@googlegroups.com, drew_g...@abtassoc.com
Hi asgallant ,
thank's for ur reply ,
Your suggestion work fine but I create many Chart dynamically so some chart of them are pie and column and bar also so they don't look fine when i apply chartArea .
 I attach image file which show how it not show right behavior for some chart . Like for some chart text automatically eclipse and when i hover mouse than a pop up suggestion about Label like Right one chart  but as left chart there suggestion not populate and text is also not eclipse . 



Thanks ,
Veer



--
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/bEvfOw_Aqf0/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/groups/opt_out.

Capture.PNG

asgallant

unread,
Oct 29, 2013, 12:17:52 AM10/29/13
to google-visua...@googlegroups.com, drew_g...@abtassoc.com
Could you post the code that is producing those two charts so I can see what might be going on?


On Monday, October 28, 2013 11:01:28 PM UTC-4, Veer Bhupendra singh wrote:
Hi asgallant ,
thank's for ur reply ,
Your suggestion work fine but I create many Chart dynamically so some chart of them are pie and column and bar also so they don't look fine when i apply chartArea .
 I attach image file which show how it not show right behavior for some chart . Like for some chart text automatically eclipse and when i hover mouse than a pop up suggestion about Label like Right one chart  but as left chart there suggestion not populate and text is also not eclipse . 



Thanks ,
Veer

On Mon, Oct 28, 2013 at 6:49 PM, asgallant <drew_g...@abtassoc.com> wrote:
You will need to play around with the chartArea option to give the legend and axis labels more space to draw (the chart area is the space where the bars are drawn).  The chartArea option has 4 sub-options: top, left, width, and height.  Top and left position the top edge and left edge of the chart area relative to the container's top and left edges.  Width and height set the width and height of the chart area.  These options can take either a number representing the distance in pixels or a percent representing the percent of the total width of the chart.  Set the chartArea options like this:

chartArea: {
    height: '65%',
    width: '70%',
    top: 15,
    left: 30
}


On Monday, October 28, 2013 5:40:09 AM UTC-4, Veer Bhupendra singh wrote:

I have defined a div with fixed height and width and displaying my chart in it.
The issue I am facing is the legend and x-axis labels are not displaying there full values(marked with red in the image).

How to resolve it..?
Any reply is highly appreciated.
Thanks

--
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/bEvfOw_Aqf0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages