Closed pizzapanther closed 4 years ago
@vasturiano ready for review again
In my usage I was still using the timerange and labelval so having access to everything is useful.
Agreed. And as mentioned in the other PR, .data
should give you access to the complete segment object, not just the spread filtered attributes.
OK i'm just going to leave it segmentTooltipHtml(d)
so you still have access to group, label, labelVal
which may be used by the custom tooltip function and are computed. And you'll have access to original data via data
Thanks @pizzapanther! This is a nice addition that adds more flexibility to the chart.
Did some minor modifications on the docs and renamed the method to segmentTooltipContent
since it can also accept plain text for a simple case.
Module is published (2.10.0
) with both PRs in. 👍
Sounds great!
Added an option to be able to supply a segment tooltip function which generates customized tooltip HTML. The function is passed
state
(chart instance) andd
(current data point).