A
A
Artur Galyaev2021-06-27 13:33:20
JavaScript
Artur Galyaev, 2021-06-27 13:33:20

How to set hover to specific points in Chart JS?

Preferably, the solution is on version 2.9.4.
I need to change the hover for certain points, in the documentation I found scripted options like:

color: function(context) {
    var index = context.dataIndex;
    var value = context.dataset.data[index];
    return value < 0 ? 'red' :  // draw negative values in red
        index % 2 ? 'blue' :    // else, alternate values in blue and green
        'green';
}

I need the same thing, but for hover

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Golub, 2021-06-30
@RazerVG

Similar
to https://www.chartjs.org/docs/latest/charts/line.ht...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question