You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Improve positioner types; allow overriding xAlign and yAlign
* More type improvements; pass in Chart as third parameter
* Expose chart as part of TooltipModel
I initially passed the Chart element as the third parameter to the positioner; however, Scale and LegendElement elements expose `this.chart`, and sample code for positioners used `this._chart`, so documenting the chart member and giving it a public name seems to make more sense.
* Update documentation
* Fix documentation
* Fix issues from code review
Copy file name to clipboardExpand all lines: docs/configuration/tooltip.md
+58-26Lines changed: 58 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,31 +59,7 @@ Possible modes are:
59
59
60
60
`'average'` mode will place the tooltip at the average position of the items displayed in the tooltip. `'nearest'` will place the tooltip at the position of the element closest to the event position.
61
61
62
-
New modes can be defined by adding functions to the `Chart.Tooltip.positioners` map.
63
-
64
-
Example:
65
-
66
-
```javascript
67
-
/**
68
-
* Custom positioner
69
-
* @functionTooltip.positioners.myCustomPositioner
70
-
* @paramelements {Chart.Element[]} the tooltip elements
71
-
* @parameventPosition {Point} the position of the event in canvas coordinates
0 commit comments