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

When unselecting a point in chart, the default color is shown temporarily #7027

Closed
sagargurtu opened this issue Aug 1, 2017 · 5 comments
Closed

Comments

@sagargurtu
Copy link

sagargurtu commented Aug 1, 2017

Expected behaviour

When a point is selected and then unselected in any chart, the transition should be correct.

Actual behaviour

When a point is unselected/unfocused in chart, the selection color changes to default #000000 temporarily before completely transitioning to unselected state.

Live demo with steps to reproduce

http://jsfiddle.net/sgrg93/b51spdkz/

Affected browser(s)

Chrome

@KacperMadej
Copy link

To set styles only through CSS please use styled mode version of Highcharts. In classic mode you would have to also set options in chart's settings object.

Demos:
http://jsfiddle.net/b51spdkz/1/
http://jsfiddle.net/6a8Lf6kn/

More about styled mode:
https://www.highcharts.com/docs/chart-design-and-style/style-by-css

This doesn't look like a bug.

@sagargurtu
Copy link
Author

This was not occurring in earlier versions of the library. Refer http://jsfiddle.net/sgrg93/b51spdkz/3/ which uses v5.0.12

@KacperMadej
Copy link

5.0.12 was lacking animation for color change, so it's hard to compare those behaviors. You could turn off the animation and then both versions are acting the same: http://jsfiddle.net/b51spdkz/4/

@sagargurtu
Copy link
Author

Agreed. But the original behavior was working since v5.0.0 and I was able to use the mix of both styled and classic modes as it was needed for many of the use cases in my product. Even if color animations have been introduced, the default selection color #000000 which has been overridden by red should not be shown.

Anyways, is there any way to disable state change animations for points only and not the whole chart?

P.S. State change color animations for points do not work in styled mode http://jsfiddle.net/sgrg93/b51spdkz/7/

@KacperMadej
Copy link

If marker options are set in chart option, then they are working correctly: http://jsfiddle.net/4L12z6xj/

Using CSS those options could be overridden: http://jsfiddle.net/4L12z6xj/1/ However, while animation runs starting color is used from non-CSS settings, so animation color stars from black stroke. Setting CSS for not styled mode (classic mode) is a hack and unfortunately this hack is not working well for animation, so chart options should be set.

There's no API option to set animation for marker state other than chart's animation.

There's an issue with loosing stroke options while only some state options are set. Resolving that issue might help with this one, but those problems are different, so I have reported the other problem here: #7034

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

No branches or pull requests

2 participants