Stop HighCharts increases hover line width

I am using the latest version of HighCharts to build a chart with several trends. By default, HighCharts increases the thickness / line width of the line when the user mouse hovers over it. Since I could have ~ 10 trends on the chart, I would like to remove this function, which means that the line thickness does not change on hover.

js code file so far

I think I need to set this in the plotOptions {} section. I tried to add the following without success:

plotOptions: {
    series: {
        mouseOver: {
            lineWidth: 2
        }
    },
    marker: {
        enabled: false,
        states: {
            hover: {
                lineWidth: 2
            }
        }
    }
},

However, I would like to keep a marker indicating where the mouse is located:

enter image description here

+4
source share
2 answers

, ( states )

plotOptions: {
            series: {
                    lineWidth: 2,
                 states: {
                    hover: {
                        enabled: false
                    }
                }
            },

DEMO


make lineWidth: 1

plotOptions: {
            series: {
                    lineWidth: 2,
                 states: {
                    hover: {
                        lineWidth: 1
                    }
                }

DEMO 2

+7

, lineWidthPlus.

plotOptions: {
  series: {
    states: {
      hover: {
        lineWidthPlus: 0
     }
    }
  }
}

, , , lineWidth .

API:

​​ :

+5

All Articles