Tooltip not showing with tooltip mode “label” and datapoint value NULL on same x value in multi line chart.

Tooltip not showing on multi line chart with tooltip mode set to “label” when datapoint with value NULL exists at the same x value as the one I hover over.

I am hiding some lines with a custom made legend by looping through datasets and setting data points to NULL. This worked fine on charts.js version 1.0.2. The tooltip then showed the labels and values for the points that had data. In version 2.1.2 the tooltip does not show up at all if some of the lines has datapoints set to NULL on the same x value as the one hovered.

It workes as descibed when tooltip mode set to “single”, but I would like to show all the values from multiple lines on the same x value (that are not NULL).

ps: when console logging “tooltipItems” in a tooltips.callbacks.label function, the yLabel for datapoints set to NULL is printed as NaN in the browser console.
pss: tested in Chrome Version 49.0.2623.112 m and IE 11.

Any tips on this would be very much appreciated. Thanks in advance:)

Author: Fantashit

1 thought on “Tooltip not showing with tooltip mode “label” and datapoint value NULL on same x value in multi line chart.

Comments are closed.