You can set chartArea.left to move the starting position of the chartArea
as well:
chartArea: {
width: 500,
left: 150
}
which should give you more room for the labels.
On Thursday, August 1, 2013 2:35:29 PM UTC-4, Daniel LaLiberte wrote:
>
> Hi,
>
> What you want to control is the width of what we call the tick labels for
> the vertical axis. The API does not provide a way of setting this width
> directly, but you can indirectly control it with a combination of the
> overall width, which you have set to 700, and the chartArea.width. So for
> example, you could add this to your options:
>
> "chartArea": {
> "width": "500"
> }
>
> and that would leave about 200 pixels for the width outside of the chart
> area. Keep in mind, this outside area includes the space to the right of
> the chart as well as the left. Hope that helps.
>
> dan
>
>
> On Thu, Aug 1, 2013 at 2:23 PM, <[email protected] <javascript:>> wrote:
>
>> I have a google chart that I am having a problem with the legend. If you
>> look at the chart below, you will note that the descriptions are cropped. I
>> need to expand the size of the left side of the legend. Does anyone know
>> how to do this? Resizing the chart itself does not solve the problem.
>>
>> You help is appreciated, and my thanks in advance.
>>
>>
>> <https://lh3.googleusercontent.com/-yC15JtcQ9AQ/Ufql-n72_PI/AAAAAAAAAAc/IJ7OLZJsieE/s1600/Chart.jpg>
>> My code for the drawing is as follows:
>> function drawChart() {
>>
>> // Create the data table.
>> var dataHouseholds = new google.visualization.DataTable();
>> dataHouseholds.addColumn('string', 'Houshold');
>> dataHouseholds.addColumn('number', 'Total');
>> dataHouseholds.addRows(<?php echo $dataHouseholds; ?>);
>> // Set chart options
>> var optionsHouseholds = {'title': '<?php echo $TitleHouseholds;
>> ?>',
>>
>> 'width':700,
>> 'height':400,
>> 'backgroundColor.stroke':'#654',
>> 'backgroundColor.strokeWidth':1
>> };
>>
>> // Instantiate and draw chart, passing in some options.
>>
>> var chartHouseholds = new
>> google.visualization.BarChart(document.getElementById('chart_Households'));
>>
>> chartHouseholds.draw(dataHouseholds, optionsHouseholds);
>> }
>>
>> --
>> 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 [email protected]<javascript:>
>> .
>> To post to this group, send email to
>> [email protected]<javascript:>
>> .
>> Visit this group at
>> http://groups.google.com/group/google-visualization-api.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
> - 978-394-1058
> [email protected] <javascript:> 562D 5CC, Cambridge MA
> [email protected] <javascript:> 9 Juniper Ridge Road, Acton MA
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.