user10000
user10000

Reputation: 207

Highstock Single Navigator for multiple Charts

Is there a known way of having a single Navigator that's able to control multiple Charts, given that they share the same time range?

Upvotes: 0

Views: 424

Answers (1)

ppotaczek
ppotaczek

Reputation: 39139

Yes, you need to only connect setting extremes process in charts, for example:

const chart1 = Highcharts.stockChart('container', {
    ...
});

Highcharts.stockChart('container2', {
    ...,
    xAxis: {
        ...,
        events: {
            setExtremes: function(e) {
                chart1.xAxis[0].setExtremes(e.min, e.max, true, false);
            }
        }
    }
});

Live demo: http://jsfiddle.net/BlackLabel/v31roh8c/

API Reference: https://api.highcharts.com/class-reference/Highcharts.Axis#setExtremes

Upvotes: 1

Related Questions