Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to disable zoom in lightningChartJS chart?

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?

like image 570
Suyash Avatar asked Sep 20 '25 00:09

Suyash


1 Answers

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 )
like image 80
Niilo Keinänen Avatar answered Sep 22 '25 16:09

Niilo Keinänen