Chartjs-Mouse-over function behaving weird in Chart.js

0👍

Fixed my hover issue.
It was happening due to another canavas overlapping on each other.

Had to remove the old canvas and reload the partial with a new canvas.

Here is a reference to what I did in my JS.

$(dateSelectors).click(function (event)
        {
            event.preventDefault();

            selectedDateLabel.innerHTML = this.innerHTML;
            selectedStartDate = this.getAttribute('data-wo-date');


            let canvas = $('#wo-chart');
            canvas.remove();
             $('#graph-container').append('<canvas id="wo-chart"></canvas>');



            search();
        });

Leave a comment