Ricardo Costa 009ae4dec6 Support hover animation duration during updates (#4300)
See discussion in the issue for context and possible approaches.

When invoking update() inside an event handler, such as onHover,
`options.hover.animationDuration` was not being respected. Given that
some use cases may require additional animation properties for the
manual update call, this commit changes that method signature to accept
a configuration object.

This object provides backwards compatibility with duration and lazy
properties, and also introduces the easing property so that the event
animation is different from the global one. 

Add tests that guarantee that when update is called manually with
arguments, it properly builds the _bufferedRequest or calls render with
the proper arguments.
It includes test cases for when update is called with legacy arguments
(duration and lazy) instead of the config object.

.update() documentation was previously updated but .render() was left
out. Since the backwards compatible change was also made to render(),
this commit adds documentation for it.
2017-06-11 12:06:39 -04:00
..
2017-05-08 18:44:01 -04:00

Developers

Developer features allow extending and enhancing Chart.js in many different ways.

Browser support

Chart.js offers support for all browsers where canvas is supported.

Browser support for the canvas element is available in all modern & major mobile browsers. CanIUse

Thanks to BrowserStack for allowing our team to test on thousands of browsers.

Previous versions

Version 2 has a completely different API than earlier versions.

Most earlier version options have current equivalents or are the same.

Please use the documentation that is available on chartjs.org for the current version of Chart.js.

Please note - documentation for previous versions are available on the GitHub repo.