Thanks asgallant. Yeah, even I am considering of using the chart data; since I experimented with the minimum value and it seems that the chart is getting recalibrated (after I apply minimum value to chart data) to new minimum value in some cases hence causing me to rethink again.
-little On Tuesday, September 3, 2013 6:42:02 PM UTC+5:30, asgallant wrote: > > The ChartLayoutInterface methods are currently documented in the "Methods" > section of the charts which support them (eg. > https://developers.google.com/chart/interactive/docs/gallery/linechart#Methodsfor > LineCharts). When you say "step size", what are you referring to? > > As a general rule, I would suggest not using the ChartLayoutInterface for > getting data about the chart; I think you are better off extrapolating the > relevant data from your DataTable and then setting the chart options > appropriately. > > On Tuesday, September 3, 2013 6:05:37 AM UTC-4, [email protected] wrote: >> >> @asgallant: Is there any place where I can find documentation for the >> methods in the listener you wrote? Next, I need is the step size of the >> rendered chart but I feel if I could know about the methods of the >> 'rendered' chart then I could explore them and use them more easily. >> >> Thanks. >> >> -little >> >> On Monday, September 2, 2013 11:18:07 PM UTC+5:30, [email protected]: >>> >>> 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]>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]: >>>>>> >>>>>> 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]. >>>>> 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. >>>>> >>>> >>>> >>>> >>>> -- >>>> Daniel LaLiberte<https://plus.google.com/100631381223468223275?prsrc=2> >>>> - 978-394-1058 >>>> [email protected] 562D 5CC, Cambridge MA >>>> [email protected] 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.
