Highcharts removes the zoom function

Hi, I am using Highcharts to display charts. The chart also uses the zoom function. I want to remove the zoom function. Any ideas on what we can do to remove the zoom feature.

+4
source share
3 answers

You can set the zoom level.

In a chart element, you can use the zoomType property and specify the exact width and height as the original size. You can also try setting enable: false or set the level to null .

See the API documentation for more information.

+4
source

Just the attribute of the zoomtype property mentioned in the diagram. I am sure that if your graph currently supports scaling, then zoomtypoe should be specified in its configuration. Just set it to false.

graph: {zoomType: false}

+1
source

open the highstock.js file. get a line with the following code

 if(!c.rendered&&(c.zoomText=e.text(i.rangeSelectorZoom,o,d.plotTop-10).css(g.labelStyle).add(),p=o+c.zoomText.getBBox().width+5,n(c.buttonOptions,function(a,b){h[b]=e.button(a.text,p,d.plotTop-25,function(){c.clickButton(b,a);c.isActive=!0} 

and replace with this code

 if(2==3&&!c.rendered&&(c.zoomText=e.text(i.rangeSelectorZoom,o,d.plotTop-10).css(g.labelStyle).add(),p=o+c.zoomText.getBBox().width+5,n(c.buttonOptions,function(a,b){h[b]=e.button(a.text,p,d.plotTop-25,function(){c.clickButton(b,a);c.isActive=!0} 

it works for me. I hope you will work too.

-3
source

Source: https://habr.com/ru/post/1382368/


All Articles