Tooltip domain values when focusTarget: 'category'

37 views
Skip to first unread message

Henry Harrison

unread,
May 10, 2016, 10:56:17 AM5/10/16
to Google Visualization API
Hi

I can't figure out where the domain values for tooltips are being retrieved from.  See below image 

























This chart's tooltips uses a date format which is different to the h-axis's date format.  Where does this format come from because this chart doesn't use that format anywhere.  How can I set the tooltip to use the current h-axis format?  While I'm at it, can I remove the labels 'Units' & 'Price' from the tooltip and use just the coloured blocks?

Current options for this chart w.r.t the tooltips:

tooltip: { 
trigger: 'both', 
textStyle: { fontSize: 12 }, 
showColorCode: true
}, 
selectionMode: 'multiple', 
aggregationTarget: 'none',
focusTarget: 'category'

Thanks
Henry


Daniel LaLiberte

unread,
May 10, 2016, 11:44:21 AM5/10/16
to Google Visualization API
Hi Henry,

The tooltip formatted values come from the data values. You can either provide exactly the formatted string you want (using {v: someDate, f: "someFormattedDate"}) or generate a formatted value using a DateFormatter, or else the default formatting rule will be applied.   The axis tick values are formatted from the hAxis.format option, since they could be computed values.  There is a default format for the tick values as well.  It would be nice if the default format for data values were the same as for tick values.  We'll have to investigate doing that in the future.

--
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.
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/2f08a048-a419-474e-b69c-329115493276%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages