Showing a hidden column in tooltips

37 views
Skip to first unread message

dunba...@gmail.com

unread,
Sep 1, 2016, 11:03:48 AM9/1/16
to Google Visualization API
Hi, 

I am using a line chart with multiple series, and am using the last column of the dataTable to store the totals at each time point. I use a dataView to stop the totals column from displaying with the rest of the data. 

What I would like is to show the total for each time point in the tooltip, at the top of the panel of values that you get with the chart option focusTarget: "category", crosshair: { trigger: "focus" }

How do I go about doing this? 

All help appreciated. 

Nick 

Daniel LaLiberte

unread,
Sep 1, 2016, 11:10:21 AM9/1/16
to Google Visualization API
There is no direct support for such a display, but you could probably create it with sufficient hacking.  Here are a couple hints if you want to pursue it.  You'll have to create your own html overlay at the right position based on where the mouse is (and thus the crosshair would be). You would need access to the corresponding total value, which you could look up in your original data table.

--
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/28176abb-33fa-4288-a8ac-2292100d7f21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Nick Dunbar

unread,
Sep 1, 2016, 12:46:47 PM9/1/16
to google-visua...@googlegroups.com
Hi Dan, 

Thanks for getting back to me. 

Do you think I could do it using a showFullTooltip() function, in the same way that can be done in Treemaps? 

The trouble with the Overlay approach is that I have to create DIV classes for the elements, and I already have a page with a lot of containers carefully balanced together which I would prefer to leave untouched. 

Regards, 
Nick 

On Thu, Sep 1, 2016 at 4:09 PM, 'Daniel LaLiberte' via Google Visualization API <google-visua...@googlegroups.com> wrote:
There is no direct support for such a display, but you could probably create it with sufficient hacking.  Here are a couple hints if you want to pursue it.  You'll have to create your own html overlay at the right position based on where the mouse is (and thus the crosshair would be). You would need access to the corresponding total value, which you could look up in your original data table.
On Thu, Sep 1, 2016 at 11:03 AM, <dunba...@gmail.com> wrote:
Hi, 

I am using a line chart with multiple series, and am using the last column of the dataTable to store the totals at each time point. I use a dataView to stop the totals column from displaying with the rest of the data. 

What I would like is to show the total for each time point in the tooltip, at the top of the panel of values that you get with the chart option focusTarget: "category", crosshair: { trigger: "focus" }

How do I go about doing this? 

All help appreciated. 

Nick 

--
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+unsubscr...@googlegroups.com.



--

--
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/RZHejDirU8s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.

Daniel LaLiberte

unread,
Sep 1, 2016, 1:00:30 PM9/1/16
to Google Visualization API
The undocumented generateTooltip option (which you could use with a showTooltip function) is only available for the Treemap so far, but it would be a good idea to support something similar elsewhere.

On Thu, Sep 1, 2016 at 11:30 AM, Nick Dunbar <dunba...@gmail.com> wrote:
Hi Dan, 

Thanks for getting back to me. 

Do you think I could do it using a showFullTooltip() function, in the same way that can be done in Treemaps? 

The trouble with the Overlay approach is that I have to create DIV classes for the elements, and I already have a page with a lot of containers carefully balanced together which I would prefer to leave untouched. 

Regards, 
Nick 
On Thu, Sep 1, 2016 at 4:09 PM, 'Daniel LaLiberte' via Google Visualization API <google-visualization-api@googlegroups.com> wrote:
There is no direct support for such a display, but you could probably create it with sufficient hacking.  Here are a couple hints if you want to pursue it.  You'll have to create your own html overlay at the right position based on where the mouse is (and thus the crosshair would be). You would need access to the corresponding total value, which you could look up in your original data table.

On Thu, Sep 1, 2016 at 11:03 AM, <dunba...@gmail.com> wrote:
Hi, 

I am using a line chart with multiple series, and am using the last column of the dataTable to store the totals at each time point. I use a dataView to stop the totals column from displaying with the rest of the data. 

What I would like is to show the total for each time point in the tooltip, at the top of the panel of values that you get with the chart option focusTarget: "category", crosshair: { trigger: "focus" }

How do I go about doing this? 

All help appreciated. 

Nick 

--
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+unsubscr...@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/28176abb-33fa-4288-a8ac-2292100d7f21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

--
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/RZHejDirU8s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsubscr...@googlegroups.com.

--
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.

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

Nick Dunbar

unread,
Sep 1, 2016, 1:20:08 PM9/1/16
to google-visua...@googlegroups.com
That would be great. But I know you have a lot things on your to do list. 

Regards, 
Nick 




--

--
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/RZHejDirU8s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages