mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-19 06:36:51 +01:00
Add parameters to tooltip filter option (#7556)
This commit is contained in:
committed by
Evert Timberg
parent
aa523da832
commit
49f18c262c
@@ -93,7 +93,7 @@ Allows sorting of [tooltip items](#tooltip-item-interface). Must implement at mi
|
||||
|
||||
### Filter Callback
|
||||
|
||||
Allows filtering of [tooltip items](#tooltip-item-interface). Must implement at minimum a function that can be passed to [Array.prototype.filter](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/filter). This function can also accept a second parameter that is the data object passed to the chart.
|
||||
Allows filtering of [tooltip items](#tooltip-item-interface). Must implement at minimum a function that can be passed to [Array.prototype.filter](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/filter). This function can also accept a fourth parameter that is the data object passed to the chart.
|
||||
|
||||
## Tooltip Callbacks
|
||||
|
||||
|
||||
@@ -185,6 +185,7 @@ Animation system was completely rewritten in Chart.js v3. Each property can now
|
||||
#### Tooltip
|
||||
|
||||
* `xLabel` and `yLabel` were removed. Please use `index` and `value`
|
||||
* The `filter` option will now be passed additional parameters when called and should have the method signature `function(tooltipItem, index, tooltipItems, data)`
|
||||
|
||||
## Developer migration
|
||||
|
||||
|
||||
Reference in New Issue
Block a user