highcharts
highcharts copied to clipboard
Styled mode line chart series className not applied to shared tooltip
Expected behaviour
Given I have a line chart, in styled mode, with a shared tooltip
When I apply a className to my series
Then I expect that className to be applied to the tooltip element for that series
Actual behaviour
The className specified is not added to the values for the series in the tooltip
Live demo with steps to reproduce
https://codepen.io/fhoeben/pen/WNJyeNQ

The line colours have been configured, these are applied to the labels but not to the tooltip. The tooltip elements do not have the weight
or bmi
class specified to their series
Product version
Highcharts JS v10.2.1 (2022-08-29)
Affected browser(s)
all
Hi @fhoeben!
I agree the class name and new colors should be reflected in the tooltip while using the styledMode
.
As a workaround, you can use other CSS selectors to change those colors- demo.
Similar to: https://github.com/highcharts/highcharts/issues/17346
@fhoeben The safest workaround (and how coloring is intended to work), is to use the colorIndex option to handle your color-to-series mapping.