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

Highlight colors for Line graphs are not saved #953

Closed
d07RiV opened this issue Feb 24, 2015 · 5 comments
Closed

Highlight colors for Line graphs are not saved #953

d07RiV opened this issue Feb 24, 2015 · 5 comments

Comments

@d07RiV
Copy link

d07RiV commented Feb 24, 2015

The Line graph does not store highlight fill/stroke colors anywhere and only uses them during initialization. As a result, new points added via addData do not change their color when highlighted.

@Galile0
Copy link

Galile0 commented Feb 25, 2015

Same issue with the Bargraph. As I dont know enough javascript to fix the issue, I'm working around it by adding data with .addData() and remove with .remove() (to get the nice animation), updating my data array with push and shift and redraw everything with animation: false. But it would be nice to get a fix for this as i assume it should be easy

@etimberg
Copy link
Member

@d07RiV can you please create a JSBin testcase for this issue?

@d07RiV
Copy link
Author

d07RiV commented Feb 26, 2015

http://jsbin.com/xotipotoxo/1/edit

Points 1-7 (from docs sample) change their color when moused over, point #8 doesn't.
Interestingly enough, if you leave the hit detection radius at 20, you can select both points #7 and #8 at the same time, which highlights them both, even though #8 doesn't have highlight color set. I couldn't figure out why this happens.

The fix is to add a few lines in initialize and addData functions, but I'm not familiar with how to do pull requests.

@oxstormrider
Copy link

I am having the same problem with the highlight using a Bar Chart. Some news about this issue?

@derekperkins
Copy link
Contributor

Huzzah! The first alpha of Chart.js 2.0 has landed and should fix this issue. Check out the release and try it out! We've got a lot of momentum right now, so please help us test so we can launch 2.0 Gold by the end of the month.
https://github.com/nnnick/Chart.js/releases/tag/v2.0-alpha

I'm closing this issue for now, but if you have implementation questions or find bugs, please create a jsfiddle and post the link here and we'll reopen this issue and get it fixed.

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

5 participants