hAxis.minValue and hAxis.maxValue are broken at the moment, so yes, they 
are useless. vAxis.minValue and vAxis.maxValue work as documented.

hAxis.viewWindow.min and hAxis.viewWindow.max are not quite the same 
because they are not overridden by the data if it falls outside the 
specified range.

I'm able to work around this using hAxis.viewWindow.min and 
hAxis.viewWindow.max, but it means I have to analyse the data myself to 
find the minimum and maximum values, then use hAxis.viewWindow.min and 
hAxis.viewWindow.max to specify either the preferred ranges or the actual 
data ranges. It's just a bit more work.

I'd prefer to use hAxis.minValue and hAxis.maxValue. Will they be fixed 
some day?


On Wednesday, May 16, 2012 3:29:40 PM UTC+2, asgallant wrote:
>
> No, they aren't useless.  min/maxValue options specify the outer 
> boundaries of the charts axis, but can be overridden if the chart's values 
> lie outside the boundaries.  The viewWindow options force the chart to 
> display a certain area regardless of the data (so, in your case, if you had 
> a data point at x=55, it would not show up on the chart).  The 
> implementation of domain axis min/maxValue options seems to be broken ATM, 
> which is probably why you had to ask the question.
>
> On Wednesday, May 16, 2012 3:14:40 AM UTC-4, Vincent Bruneau wrote:
>>
>> Thank you it's work. 
>>
>> So minValue and maxValue are useless ? 
>>
>> On May 15, 7:11 pm, asgallant <[email protected]> wrote: 
>> > 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/-/h3UgrQhK720J.
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