Not allowing non-whole numbers in axis for interactive charts

2,045 views
Skip to first unread message

Kelly Miyashiro

unread,
Sep 28, 2010, 4:12:56 PM9/28/10
to Google Visualization API
Just wondering if there's a way to disallow non-whole numbers in the
vertical or horizontal axis for the interactive line/bar/column
charts.

When we are charting things that only come in whole numbers, it's kind
of embarrassing to be showing 1.5 or .5 in the scale. If this feature
could be considered for the future that would be awesome.

Badtnik

unread,
Sep 29, 2010, 4:06:38 AM9/29/10
to google-visua...@googlegroups.com
Well, it is currently unsupported, but indeed sounds interesting and might its way to our future roadmap

  Badtnik



--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.


Galen Vinter

unread,
Aug 29, 2011, 9:29:18 PM8/29/11
to google-visua...@googlegroups.com
I still can't find any new documentation for this feature.

Has anyone else seen/heard anything?

Thanks,
Galen

Viz Kid

unread,
Aug 30, 2011, 2:54:39 AM8/30/11
to google-visua...@googlegroups.com

Unfortunately this is still not supported explicitly. However, we usually try to avoid fractions when possible. So if your data starts at 0 (and is usually positive), you can set maxValue to 6 for the proper axis and it would probably avoid fractions.

  Viz Kid

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.

asgallant

unread,
Aug 30, 2011, 10:10:14 AM8/30/11
to google-visua...@googlegroups.com

Thayne McCombs

unread,
Aug 1, 2014, 4:02:47 PM8/1/14
to google-visua...@googlegroups.com
Setting the maxValue to 6 doesn't work if you have values more than 6. Unfortunately, in my case, I don't know what the maximum value is, and it looks like the only solution is to loop through the entire table and find the largest value, which is rather inconvenient. Is there any plans to add this feature?


On Tuesday, August 30, 2011 12:54:39 AM UTC-6, Viz Kid wrote:

Unfortunately this is still not supported explicitly. However, we usually try to avoid fractions when possible. So if your data starts at 0 (and is usually positive), you can set maxValue to 6 for the proper axis and it would probably avoid fractions.

  Viz Kid

On Tue, Aug 30, 2011 at 4:29 AM, Galen Vinter <galen....@gmail.com> wrote:
I still can't find any new documentation for this feature.

Has anyone else seen/heard anything?

Thanks,
Galen

--
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/-/G11o-lUEiYUJ.

To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualization-api+unsub...@googlegroups.com.

Andrew Gallant

unread,
Aug 1, 2014, 8:54:47 PM8/1/14
to google-visua...@googlegroups.com
The easy way to find the max value is to use the DataTable#getColumnRange method, which will return an object with min and max properties.  You can file a feature request to add support for integer-only axis values if you like.

Morar Ioan

unread,
Dec 14, 2015, 9:05:56 AM12/14/15
to Google Visualization API, mall...@gmail.com
I also have a big problem with negativeColor on x/y axis. I want that when I have negative on axis to be red. How can I do that? Or how can I insert a class on text tag only for axis to can customize from js??

Jonny

Daniel LaLiberte

unread,
Dec 14, 2015, 10:06:49 AM12/14/15
to Google Visualization API, mall...@gmail.com
Sorry Jonny,

We don't have a way of coloring different parts of the axes differently.  We are thinking of adding options to support that however.

--
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 google-visualizati...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.

Morar Ioan

unread,
Dec 14, 2015, 10:22:10 AM12/14/15
to google-visua...@googlegroups.com
But can I add css class in a way to "text" tag?

Jonny
> dlali...@Google.com 5CC, Cambridge MA
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google Visualization API" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-visualization-api/BKABdmNn3A8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> google-visualizati...@googlegroups.com.
> To post to this group, send email to
> google-visua...@googlegroups.com.
> Visit this group at
> https://groups.google.com/group/google-visualization-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJPMyTZVc2%3DZKhpgV1C0j7GzTyP4yy2preiEXfpb7Qed3g%40mail.gmail.com.

Daniel LaLiberte

unread,
Dec 14, 2015, 10:35:12 AM12/14/15
to Google Visualization API
We don't have ids or classes on the elements so that you might be able to target them with css.  But that might be one way we could support customization.


For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages