mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-08 01:06:51 +01:00
Add parameters to tooltip filter option (#7556)
This commit is contained in:
committed by
Evert Timberg
parent
aa523da832
commit
49f18c262c
@@ -602,7 +602,7 @@ export class Tooltip extends Element {
|
||||
|
||||
// If the user provided a filter function, use it to modify the tooltip items
|
||||
if (options.filter) {
|
||||
tooltipItems = tooltipItems.filter((a) => options.filter(a, data));
|
||||
tooltipItems = tooltipItems.filter((element, index, array) => options.filter(element, index, array, data));
|
||||
}
|
||||
|
||||
// If the user provided a sorting function, use it to modify the tooltip items
|
||||
|
||||
Reference in New Issue
Block a user