It is currently Wed Apr 16, 2014 12:15 pm Advanced search

Synchronizing multiple Highstock charts

Technical support for the Highcharts Stock package

Synchronizing multiple Highstock charts

Postby digijan » Tue Nov 29, 2011 4:41 pm

Hi,

Considering following scenario that I have two Highstock charts on the same page. Is it possible to align viewed data on both charts when using scrollbar or navigator of either one? This way both charts would be in sync.

This would be really useful when for example comparing stock data.

Br,

Jan
digijan
 
Posts: 2
Joined: Tue Nov 29, 2011 4:27 pm

Re: Synchronizing multiple Highstock charts

Postby hfrntt » Thu Dec 01, 2011 1:46 pm

It's quite easy. You just have to use setExtremes event (http://www.highcharts.com/ref/#xAxis-ev ... etExtremes) in one chart and setExtremes function(http://www.highcharts.com/ref/#axis-object) in another. Here you can find a demo: http://jsfiddle.net/hfrntt/XLzFW/

However if you'd like to compare two series, you can use separated y axes, like in this demo: http://highcharts.com/stock/demo/candlestick-and-volume
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am

Re: Synchronizing multiple Highstock charts

Postby nmyvision » Fri Feb 17, 2012 5:56 am

Is there a way to have to top navigator linked to the bottom chart?

I know you can assign a series to a navigator but my chart is dynamic and i want to avoid having to add a point to both (if i can).
nmyvision
 
Posts: 13
Joined: Fri Apr 15, 2011 4:39 pm

Re: Synchronizing multiple Highstock charts

Postby hfrntt » Wed Feb 22, 2012 10:59 pm

You meant, when you add point to the bottom chart you want to update navigator as well? If yes, then you should do it on your own - for highstock these are two, separated charts.
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am


Return to Highstock Usage

Who is online

Users browsing this forum: No registered users and 3 guests