Apex 图表禁用滚动/缩放

Apex charts disable scrolling / zooming

我使用 ApexCharts 库构建了一个图表,我想禁用拖动图表的可能性。我应该如何更新我的配置(见下文)?我在文档中找不到任何细节。这是我的图表:

//My component
<Chart
  options={performanceLineChart.options}
  series={performanceLineChart.series}
/>

//My configurations
export const performanceLineChart = {
  options: {
    chart: {
      id: 'my-chart',
      type: 'line' as 'line',
      toolbar: {
        show: false //Disable toolbar
      }
    },
    stroke: {
      width: 5,
      curve: 'smooth' as 'smooth'
    },
    markers: {
      size: 4,
      hover: {
        size: undefined,
        sizeOffset: 2
      }
    },
    xasis: {
      type: 'numeric',
    }
  },
  series: [{
    name: 'Line 1',
    data: [
      [3066, 323],
      [6317, 312],
      [12498, 313],
      [24091, 326]
    ]
  },{
    name: 'Line 2',
    data: [
      [3516, 281],
      [7378, 268],
      [11502, 344],
      [21219, 371]
    ]
  }]
}

我猜你说的是选择缩放,你可以像这样关闭它

chart: {
  id: 'my-chart',
  type: 'line' as 'line',
  toolbar: {
    show: false
  },
  zoom: {
    enabled: false,
  }
},