Should calling chart.update() after modifying annotation options trigger changes?
See original GitHub issueI’m trying to change the line annotations I’ve created with updates to the datasets. Is it possible to modify the annotation options in place and then observe changes after chart.update()
? I’m not currently seeing this but may be doing something wrong or should be replacing the chart.options.annotation
object completely.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:12 (2 by maintainers)
Top Results From Across the Web
why do we have to use @Modifying annotation for queries ...
Doing so triggers the query annotated to the method as an updating query instead of selecting one. As the EntityManager might contain outdated ......
Read more >Spring Data JPA @Modifying Annotation
The @Modifying annotation is used to enhance the @Query annotation so that we can execute not only SELECT queries, but also INSERT, UPDATE,...
Read more >Updating Charts | Chart.js
It's pretty common to want to update charts after they've been created. When the chart data or options are changed, Chart.js will animate...
Read more >Implementing Bulk Updates with Spring Data JPA
Updating a huge number of entities with Spring Data JPA is often inefficient. But there are 2 simple ways to create effiicient bulk...
Read more >Chart Development Tips and Tricks
The required function allows you to declare a particular values entry as required for template rendering. If the value is empty, the template...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had some trouble with getting the options to propagate correctly, but in the end, this worked for me:
See this jsfiddle for an example. [Note that this is actually a test for a PR I’ve worked on, so don’t expect
chart.render()
to update annotations until #116 is merged]For everyone who’s fiddling around with this like me: It’s also possible to update the content of an annotation label in the same way 😃
In this example I’m drawning an horizontal line that shows the mean value of a bar chart.