-
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
Will it ever be possible for the update function to update the options of the chart as well? #2060
Comments
@dibsyjr1 this is not currently supported in either version 1 or version 2. It should be possible, the most annoying thing would be the performance decrease caused by re-merging the config with the global config. |
Hi, thanks for the reply. I understand that it would cause a performance decrease. Was just thinking you could have a prototype method (hardUpdate for example) that people can choose to call as an alternative to the update function, which would as a result update the entire chart, including options. Kind of like how when update is called, render is subsequently called, but instead it'd be hardUpdate, calling update which in turn calls render (so hardUpdate would only contain the required code to update the options). Just so the functionality is there if someone were to require it without forcing the performance decrease on everyone who wanted to call update. Thanks again :) |
Yup, I think we can provide this functionality though it won't make the 2.0.0 release |
Okay that's cool, thanks very much |
Why not just add another function for this? And don't use update() as God-function, but divide it by steps, or even remove it leaving something like updateConfig(), updateData() and render(). |
Hi,
i'm looking to switch between a regular bar chart and a stacked bar chart on the fly. At the moment this is only possible by destroying and re-creating the chart but this causes a flicker when doing so (as the chart is essentially being removed and put back onto the web page). I thought it would be much more efficient to be able to update the options seeing as we are only looking to toggle stacked and the title of the chart. Just wondering if this will ever be possible?
Thanks
The text was updated successfully, but these errors were encountered: