3

In a chart created using LightningChartJS one can zoom in or zoom out of a particular section by dragging the mouse.Is it possible to disable the zoom functionality?

Suyash
  • 61
  • 3

1 Answers1

3

ChartXY has several methods for enabling/disabling individual mouse/touch interactions, all of which are named with the prefix: setMouseInteraction...

Zooming in can be disabled with

chart.setMouseInteractionRectangleZoom( false )

Fitting can be disabled with

chart.setMouseInteractionRectangleFit( false )
Niilo Keinänen
  • 2,187
  • 1
  • 7
  • 12