mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-07 00:36:50 +01:00
Added new plugin Callback afterScaleUpdate
Following a Slack conversation tadd new Callback to allow updates to datasets config (ie borderColor) based on results of the calculated scale, A typical use case would be apply a Gradient fill. On branch feature_New_plugin_interface_afterScaleUpdate Changes to be committed: modified: dist/Chart.bundle.js modified: dist/Chart.bundle.min.js
This commit is contained in:
@@ -377,6 +377,7 @@ Plugins will be called at the following times
|
||||
* Start of initialization
|
||||
* End of initialization
|
||||
* Start of update
|
||||
* After the chart scales have calculated
|
||||
* End of update (before render occurs)
|
||||
* Start of draw
|
||||
* End of draw
|
||||
@@ -389,6 +390,7 @@ Plugins should derive from Chart.PluginBase and implement the following interfac
|
||||
afterInit: function(chartInstance) { },
|
||||
|
||||
beforeUpdate: function(chartInstance) { },
|
||||
afterScaleUpdate: function(chartInstance) { },
|
||||
afterUpdate: function(chartInstance) { },
|
||||
|
||||
// This is called at the start of a render. It is only called once, even if the animation will run for a number of frames. Use beforeDraw or afterDraw
|
||||
|
||||
Reference in New Issue
Block a user