-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Comments
This will work in the next release |
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. |
the PR that implemented this was #3587 |
Closing as implemented since 2.5 will release soon |
@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 |
@egemon Have you found any way to implement it? I have a few changes in options and want to update the chart(options) accordingly |
@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, |
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).
Environment
The text was updated successfully, but these errors were encountered: