{
name: 'Mode: index',
handler(chart) {
+ chart.options.interaction.axis = 'xy';
chart.options.interaction.mode = 'index';
chart.update();
}
{
name: 'Mode: dataset',
handler(chart) {
+ chart.options.interaction.axis = 'xy';
chart.options.interaction.mode = 'dataset';
chart.update();
}
{
name: 'Mode: point',
handler(chart) {
+ chart.options.interaction.axis = 'xy';
chart.options.interaction.mode = 'point';
chart.update();
}
{
name: 'Mode: nearest',
handler(chart) {
+ chart.options.interaction.axis = 'xy';
chart.options.interaction.mode = 'nearest';
chart.update();
}
// Create a custom tooltip positioner to put at the bottom of the chart area
components.Tooltip.positioners.bottom = function(items) {
const pos = components.Tooltip.positioners.average(items);
+
+ // Happens when nothing is found
+ if (pos === false) {
+ return false;
+ }
+
const chart = this._chart;
return {