Increase the line width when hovering the cursor in plotly?

I’d like to increase the width of the line and its points when hovering the mouse cursor over a line. Animate parameters such as marker size and line width somehow when the mouse cursor is over them. How can I do that?

  <script src="" charset="utf-8"></script>
  <div id="myDiv"></div>
    var data = [
        x: ['2013-10-04 22:23:00', '2013-11-04 22:23:00', '2013-12-04 22:23:00'],
        y: [1, 3, 6],
        type: 'scatter',
        mode: "lines+markers",
        marker: {
          size: 10
        line: {
          width: 4

    Plotly.newPlot('myDiv', data);

Is there anyone alive here?

Hi, I think there is no hover event fired for lines, only for markers. So it’ll be difficult to achieve this.

Are you sure that’s not possible? It’s a huge disadvantage. It works in chart.js, but the library itself is very slow.

Hi, I’m not sure 100% as I’m working with python. Maybe I’ll find out. If I do, I’ll get back to you.

Well, it looks like it’s really impossible for plotly.

Yes. Maybe this feature gets developed in the future however.

1 Like