Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

Convert Scale Legacy Callbacks to Plugin Hooks

Open etimberg opened this issue 2 years ago • 0 comments

Feature Proposal

There are a number of legacy callbacks in scales that should either be removed or replaced with plugin hooks.

Legacy callbacks:

  • beforeUpdate
  • beforeSetDimensions
  • afterSetDimensions
  • beforeTickToLabelConversion
  • afterTickToLabelConversion
  • beforeCalculateLabelRotation
  • afterCalculateLabelRotation
  • beforeFit
  • afterFit
  • afterUpdate

Possible Implementation

Replace direct call(this.options[plugin]) with Scale._callHooks() as we've already done for beforeDataLimits, afterDataLimits, beforeBuildTicks, afterBuildTicks

etimberg avatar Feb 13 '22 14:02 etimberg