Axis Callbacks
Reference External Link
There are a number of config callbacks that can be used to change parameters in the scale at different points in the update process. The options are supplied at the top level of the axis options.
Namespace:
options.scales[scaleId]
.Options(o => o
.Scales(s => s
.ScaleId("y")
.BeginAtZero(true)
.Callbacks(c => c
.BeforeUpdate("onBeforeUpdate")
.AfterUpdate("onAfterUpdate"))))BeforeUpdate
Callback called before the update process starts.
.BeforeUpdate("functionName")AfterUpdate
Callback that runs at the end of the update process.
.AfterUpdate("functionName")BeforeSetDimensions
Callback that runs before dimensions are set.
.BeforeSetDimensions("functionName")AfterSetDimensions
Callback that runs after dimensions are set.
.AfterSetDimensions("functionName")BeforeDataLimits
Callback that runs before data limits are determined.
.BeforeDataLimits("functionName")AfterDataLimits
Callback that runs after data limits are determined.
.AfterDataLimits("functionName")BeforeBuildTicks
Callback that runs before ticks are created.
.BeforeBuildTicks("functionName")AfterBuildTicks
Callback that runs after ticks are created. Useful for filtering ticks.
.AfterBuildTicks("functionName")BeforeTickToLabelConversion
Callback that runs before ticks are converted into strings.
.BeforeTickToLabelConversion("functionName")AfterTickToLabelConversion
Callback that runs after ticks are converted into strings.
.AfterTickToLabelConversion("functionName")BeforeCalculateLabelRotation
Callback that runs before tick rotation is determined.
.BeforeCalculateLabelRotation("functionName")AfterCalculateLabelRotation
Callback that runs after tick rotation is determined.
.AfterCalculateLabelRotation("functionName")BeforeFit
Callback that runs before the scale fits to the canvas.
.BeforeFit("functionName")AfterFit
Callback that runs after the scale fits to the canvas.
.AfterFit("functionName")