Set the hAxis.viewWindowMode option to 'explicit' and 
the hAxis.viewWindow.max/min options to force the chart to draw a given 
range, even if the data would normally make it otherwise:

hAxis: {
    viewWindowMode: 'explicit',
    viewWindow: {
        max: 50
    }
} 

On Tuesday, May 15, 2012 12:00:12 PM UTC-4, Vincent Bruneau wrote:
>
> Hello, 
>
> In this code I try to modify the maxValue of hAxis : 
>
> function drawVisualization() { 
>   // Create and populate the data table. 
>   var data = google.visualization.arrayToDataTable([ 
>     ['x', 'Cats', 'Blanket 1', 'Blanket 2'], 
>     [0,   1,       1,           0.5], 
>     [1,   2,       0.5,         1], 
>     [2,   4,       1,           0.5], 
>     [3,   8,       0.5,         1], 
>     [4,   7,       1,           0.5], 
>     [4,   7,       0.5,         1], 
>     [5,   8,       1,           0.5], 
>     [3,   4,       0.5,         1] 
>   ]); 
>
>   // Create and draw the visualization. 
>   new 
> google.visualization.LineChart(document.getElementById('visualization')). 
>       draw(data, {curveType: "function", 
>                   width: 500, height: 400, hAxis:{title:'plop', 
> maxValue:50}, 
>                   vAxis: {maxValue: 10}} 
>           ); 
> } 
>
>
> but in the graphic the hAxis stay from 0 to 5 . 
>
> Where I'm wrong ? 
>
> Thank

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/tP1hXy28LfMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to