mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-06 16:26:52 +01:00
fix: pass timestamp to ticks callback (#10540)
* fix: pass timestamp to ticks callback * docs: edit labelling page * docs: additions to the migration guide
This commit is contained in:
@@ -22,7 +22,7 @@ To do this, you need to override the `ticks.callback` method in the axis configu
|
||||
|
||||
The method receives 3 arguments:
|
||||
|
||||
* `value` - the tick value in the **internal data format** of the associated scale.
|
||||
* `value` - the tick value in the **internal data format** of the associated scale. For time scale, it is a timestamp.
|
||||
* `index` - the tick index in the ticks array.
|
||||
* `ticks` - the array containing all of the [tick objects](../api/interfaces/Tick).
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ A number of changes were made to the configuration options passed to the `Chart`
|
||||
#### Specific changes
|
||||
|
||||
* The radialLinear grid indexable and scriptable options don't decrease the index of the specified grid line anymore.
|
||||
* Ticks callback on time scale now receives timestamp instead of a formatted label.
|
||||
|
||||
#### Type changes
|
||||
* The order of the `ChartMeta` parameters have been changed from `<Element, DatasetElement, Type>` to `<Type, Element, DatasetElement>`
|
||||
|
||||
Reference in New Issue
Block a user