Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Chart Tools - overlapping labels

I'm using Google Chart Tools to display a simple line graph for unknown reason the labels overlap no matter how I set the "legend" parameters. In the screenshot below you can see the result for legend: {position: 'in', alignment:'center'}. How to work around this?The labels are overlapping

like image 384
Kuba Orlik Avatar asked Nov 06 '12 15:11

Kuba Orlik


People also ask

How do you change the width of a bar in a Google chart?

Right-click on any column inside your chart. Select 'Format data series'. Drag the slider under the 'Gap width' to the right to make the columns thinner and to the left to make the columns wider.


2 Answers

"..when people generally complain about labels overlapping, that's due to attempting to draw in an invisible container. We currently do not support this, so you need to make sure that your container is not display:none when you draw the chart." - Sergey

Link: https://groups.google.com/forum/#!topic/google-visualization-api/c-KpZk--8p0

like image 88
clintgh Avatar answered Oct 24 '22 05:10

clintgh


I had a chart loading near the bottom of a pretty complex page and this issue started. I decided to execute the creation of the chart after the page had loaded to give the parent div time to render. $(document).ready(function(){ makeChart(data); }) And the css for the parent div had a fixed height & width.

Hope this helps!

like image 27
Mike Wright Avatar answered Oct 24 '22 05:10

Mike Wright