Chartjs-ChartJS – tooltip of one element is covering point that user should be able to select

1👍

So, I think I’ve figured out your problem! Your tooltip parameters should be inside an options argument!

Like this:

options:{
  tooltips: {
      custom:function(tooltipModel)
      {
        tooltipModel.yAlign="bottom";
        tooltipModel.y=tooltipModel.y-30;
      },
      intersect:true
    }
}

I would advise that you wouldn’t make the tooltip follow the mouse, it can easily block more elements rather than making them visible.

I’ve prepared a fiddle with random data, and with a custom function I’ve forced the tooltip to always be on top. You can also console.log(tooltipModel) and mess around with the parameters for the intended styles.

Hope this helps you.

JSFiddle

Leave a comment