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

Chart options are not updated by .update() #3749

Closed
chron0 opened this issue Dec 28, 2016 · 7 comments
Closed

Chart options are not updated by .update() #3749

chron0 opened this issue Dec 28, 2016 · 7 comments

Comments

@chron0
Copy link

chron0 commented Dec 28, 2016

Expected Behavior

When changing chart options of the yAxis, like scaleLabel.fontColor and ticks.fontColor, a call to .update() will draw the chart with updated label and tick colors.

Current Behavior

.update() will update the graph color (which is defined within data) but not ticks or labels (which are in the options dataset). Only reloading the whole site and building the chart from scratch it uses the new values.
As you can see in the screenshot, the graph and fill have been updated to blue, but the temperature label on the left yAxis is still orange (the original value).

localhost-8100- 2

Environment

@etimberg
Copy link
Member

This will work in the next release

@chron0
Copy link
Author

chron0 commented Dec 28, 2016

Awesome, I'm really looking forward to it. Thanks to all who contributed time and work to chartjs and for sharing it. There seem to be no other lightweight charting libraries, that won't require a whole bunch of other libs & frameworks.

@etimberg
Copy link
Member

the PR that implemented this was #3587

@etimberg
Copy link
Member

Closing as implemented since 2.5 will release soon

@egemon
Copy link

egemon commented Nov 2, 2017

@etimberg is there any way to pass the same options object to update function as we r passing to constructor. As far as I see, this feature enables doted changes to options. But what if I have a lot of small changes to options that I need to perform. Does it make sense to collect them to single options object and feed this object to update? Is it possible to implement?

@binDongKim
Copy link

@egemon Have you found any way to implement it? I have a few changes in options and want to update the chart(options) accordingly

@binDongKim
Copy link

@etimberg Is there any other way to update the option of the chart instance other than updating the each option field specifically? As @egemon pointed out above, if there's a case for a various of field changes in option, it would be better if we are able to assign the new option object to the option property of the chart instance like, this.chartObj.option = newOptionObj;

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

4 participants