Chart JS Tooltip – place it in a fixed location outside the canvas

πŸ‘:0

I got it to work out using customToolTips and using the tooltip.dataPoints.length. One issue I had when going through this though was that an error appears in the console when you go out of the canvas area, but doesn’t stop anything from working.

I’m not exactly how to fix this one, but if anyone has encountered it, please let me know:

 (http://localhost:3000/Chart.js:10917:4)
dashboard:178 Uncaught TypeError: Cannot read property 'style' of null
    at ChartElement.customTooltips (dashboard:178)
    at ChartElement.update (Chart.js:8660)
    at ChartElement.handleEvent (Chart.js:8952)
    at Chart.eventHandler (Chart.js:4679)
    at listener (Chart.js:4609)
    at HTMLCanvasElement.proxies.(anonymous)

Leave a comment