Can I scale to two Highcharts charts?

I have a graph graph and a graph graph from the Highcharts API on my page that scale on the x axis like this:

chart: { type: 'line', zoomType: 'x' } 

Can this be done if I zoom in on one chart, does it apply the same scale to another chart? And vice versa?

I looked online and in the API, and I can’t find anything, but I feel that this should be possible.

+4
source share
1 answer

This fiddle helped to understand this:

jsfiddle.net/Gv7Tg/27/

It basically rewrites the setExtremes method using a special event propagation to other graphs.

  events:{ afterSetExtremes:function(){ ... } } 
+6
source

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


All Articles