Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeline chart: Wrong point-to-labelbox path color in styled mode #17614

Closed
scebotari66 opened this issue Aug 17, 2022 · 2 comments · Fixed by #18682
Closed

Timeline chart: Wrong point-to-labelbox path color in styled mode #17614

scebotari66 opened this issue Aug 17, 2022 · 2 comments · Fixed by #18682

Comments

@scebotari66
Copy link

Expected behaviour

In the demo example for timeline chart, the axis point matches the color of the path going to the label box. I would expect the same in styled mode.
image

Actual behaviour

In styled mode the path color differs from the point color (it inherits from .highcharts-color-0). While there are color classes for the paths (e.g. highcharts-data-label-color-1), there are no style rules for these. The same issue is with bullet colors in the label box.
image

Live demo with steps to reproduce

https://jsfiddle.net/scebotari66/1btx2wd3/

Product version

Highcharts JS v10.2.0 (2022-07-05)

Affected browser(s)

All

@scebotari66
Copy link
Author

For anyone having the same problem, I ended up generating the color rules for the highcharts-data-label-color- classes myself. Similarly to how highcharts-color- rules are generated in the default provided SCSS file.

@import '~highcharts/css/highcharts.scss';

// Fix path colors not matching point colors
@for $i from 1 through length($colors) {
  $color: nth($colors, $i);
  .highcharts-data-label-color-#{$i - 1} {
    fill: $color;
    stroke: $color;
  }
}

@pawellysy
Copy link
Contributor

Hi @scebotari66, thanks for reporting this issue, and sorry for the lengthy response.
Your workaround works, but this is a bug in the core, and we will try to fix it so that you don't need to generate the classes yourself. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants