Thanks Daniel for the minValue solution. It would not suit my situation
since the data which may give good visualization when minValue = 0 for some
data values would fail when I need to see how the flow is going for other
values. E.g.
[98, 99, 90, 94, 93, 92] Here I would like to have minimum set somewhere to
85. One may say to use chart_data.GetRange(1).min //* there is a function
which allows to get the minimum in the data, I forgot its syntax but looks
similar to what i have written.
* but I have a 2-D array of data. I plan to go with what asgallant
suggested.
-little
On Monday, September 2, 2013 11:04:10 PM UTC+5:30, Daniel LaLiberte wrote:
>
> Another way to 'determine' what the minimum value will end up as is to
> tell the chart to use the value that you want. For bar and column charts,
> the default minimum value (and the baseline) really should be 0, and that
> will likely happen in a future version of the charts. But for now, you can
> force that to happen by adding a minValue option, like so:
>
> vAxis: {title: "Cups", minValue: 0}
>
> Not exactly a direct answer to your question, but maybe it will help.
>
>
> On Mon, Sep 2, 2013 at 11:41 AM, asgallant
> <[email protected]<javascript:>
> > wrote:
>
>> You can use the new ChartLayoutInterface (available on some, but not all,
>> charts) to get that data. Create a "ready" event handler with this code:
>>
>> google.visualization.events.addListener(chart, 'ready', function () {
>> var cli = chart.getChartLayoutInterface();
>> var chartAreaBounds = cli.getBoundingBox('vAxis#0#gridline');
>> var top = chartAreaBounds.top;
>> var height = chartAreaBounds.height;
>> var yAxisBase = cli.getVAxisValue(top + height);
>> // or
>> var yAxisBase = cli.getVAxisValue(top + height - 0.5);
>> });
>>
>> There is some margin of error involved, as the axis may not actualy line
>> up on a specific pixel, so sometimes you have to adjust, and the only good
>> way to know whether or not you have to adjust is by testing.
>>
>> On Monday, September 2, 2013 8:30:08 AM UTC-4, [email protected] wrote:
>>>
>>> Forgot to add the source for the image: https://developers.**
>>> google.com/chart/interactive/**docs/gallery/combochart<https://developers.google.com/chart/interactive/docs/gallery/combochart>
>>>
>>>
>>> On Monday, September 2, 2013 5:59:06 PM UTC+5:30, [email protected]:
>>>>
>>>> Is it possible to get the minimum calculated value on the google chart?
>>>>
>>>>
>>>> <https://lh5.googleusercontent.com/-YH---oBJvrk/UiSEcw2Nx8I/AAAAAAAAAAM/P5HFOuVZaJE/s1600/chart.png>
>>>> The image might be more helpful. Thanks.
>>>>
>>> --
>> 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.