Histogram: Determine bucket which contains value X

16 views
Skip to first unread message

Humble Millennial

unread,
Nov 18, 2016, 1:45:20 PM11/18/16
to Google Visualization API
Is there a way to determine which bucket a specific value was assigned to so you can select that bucket in the chart programmically?

If there isn't, an exposed method on the histogram chart would be handy.

Daniel LaLiberte

unread,
Nov 18, 2016, 2:11:53 PM11/18/16
to Google Visualization API
Sorry, there is no way to determine which bucket a value was assigned to, nor is there a way to get a list of buckets.  

But you should be able to select an item in a bucket (if you are not hiding items) using the setSelection() method.  You specify the row and column of a data value in your datatable rather than specify the value itself.

On Fri, Nov 18, 2016 at 1:45 PM, Humble Millennial <humblemi...@gmail.com> wrote:
Is there a way to determine which bucket a specific value was assigned to so you can select that bucket in the chart programmically?

If there isn't, an exposed method on the histogram chart would be handy.

--
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-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@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/a1f9116c-46eb-4dac-817a-870596c0b05a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Humble Millennial

unread,
Nov 18, 2016, 4:12:01 PM11/18/16
to Google Visualization API
I do have a use case where it would be beneficial to know which bucket to select from a value that is out of sample. As a workaround, I will try finding the closest value to the out of sample number and select the bucket that way.


On Friday, November 18, 2016 at 12:11:53 PM UTC-7, Daniel LaLiberte wrote:
Sorry, there is no way to determine which bucket a value was assigned to, nor is there a way to get a list of buckets.  

But you should be able to select an item in a bucket (if you are not hiding items) using the setSelection() method.  You specify the row and column of a data value in your datatable rather than specify the value itself.
On Fri, Nov 18, 2016 at 1:45 PM, Humble Millennial <humblemi...@gmail.com> wrote:
Is there a way to determine which bucket a specific value was assigned to so you can select that bucket in the chart programmically?

If there isn't, an exposed method on the histogram chart would be handy.

--
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-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.



--
Reply all
Reply to author
Forward
0 new messages