从区域样条图中删除线点

问题描述 投票:0回答:1

我需要从线的线上删除点。我已经看到了这个答案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]
    }
  ]
})

有人可以帮忙!!

javascript highcharts react-highcharts
1个回答
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

© www.soinside.com 2019 - 2024. All rights reserved.