从区域样条图中删除线点

时间:2019-02-27 05:47:10

标签: javascript highcharts react-highcharts

我需要从行的线中删除点。我已经看到了这个答案Stop HighCharts increasing width of line on hover,但对我没有用。

这里是fiddle

这是我的代码

Highcharts.chart('graph_box', {
  chart: {
    type: 'areaspline',
    width: 300,
    height: 275
  },
  xAxis: {
    gridLineWidth: 0,
    labels: {
      enabled: false
    },
    categories: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']
  },
  yAxis: {
    title: {
      text: ''
    },
    gridLineWidth: 0,
    labels: {
      enabled: false
    }
  },
  tooltip: {
    shared: true,
    valueSuffix: ' units'
  },
  credits: {
    enabled: false
  },
  plotOptions: {
    line: {
        marker: {
            enabled: false
        }
    },
    areaspline: {
      fillOpacity: 0.5
    },
    series: {
      lineWidth: 2,
      states: {
        hover: {
          enabled: false
        }
      }
    }
  },
  series: [
    {
      lineColor: '#8b8bff',
      color: '#c5c6ff',
      lineWidth: '4px',
      data: [3, 8, 9, 5, 4, 10, 12, 6, 7, 1, 4, 6]
    }
  ]
})

有人可以帮忙吗!

1 个答案:

答案 0 :(得分:1)

可以通过以下方式禁用系列标记:

        plotOptions: {
            line: {
                marker: {
                    enabled: false
                },
                states: {
                    hover: {
                        enabled: false
                    }
                }
            }
        },

实时演示:http://jsfiddle.net/BlackLabel/4o023vxg/

API:https://api.highcharts.com/highcharts/plotOptions.line.states.hover.enabled