There are a few different approaches you can take. The most elegant
approach is to set the gridlines.count and the vAxis.viewWindow.min/max
options such that (max - min) / (count - 1) is an integer value. The
default value of the gridlines.count is 5, so you could, as an example, set
vAxis.viewWindow.min = 0 and vAxis.viewWindow.max = 4 and you wouldn't have
any decimal values in the vAxis.
On Friday, March 29, 2013 7:01:01 AM UTC-4, chartuser wrote:
>
> Hi All,
>
> Kindly let me know how to avoid decimal values in combo chart.
>
> if the given number is very small, by default it adds decimal value and
> displayed in the chart in v axis, kindly let me know how to avoid the
> decimal value.
>
> sample code:
>
> var data = new google.visualization.DataTable();
> data.addColumn('string','Date');
> data.addColumn('number', 'aaa');
> data.addColumn('number', 'bbb');
> data.addRows(1);
> data.setValue(0, 0, '2013-03-26');
> data.setValue(0, 1, 1);
> data.setValue(0, 2, 1);
>
> var options = {
> title : 'Monthly Coffee Production by Country',
> vAxis: {title: "Cups"},
> hAxis: {title: "Month"},
> seriesType: "bars",
> series: {15: {type: "bars"}}
> };
>
> Thanks in advance.
>
>
>
>
>
--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.