Home › forums › StockChart Support › Syncing Multiple StockCharts
We’ve tried various combinations, and all exhibit the same failure. This is one example.
Created a page with four StockCharts. All work and update as expected.
Now, we want to synchronize Range changes between all four.
Using the cJs provided sample for the original Chart as a basis, we create
a “rangeChanged” handler, that cycles through all three (non-event target)
charts and performs:
This appears to work, initially, but here’s the failure case. If we click
in “Chart #1” to change the range (either with slider handles or via the
“1m / 3m / 6m…” buttons) the range changes correctly in all four charts.
But, if we now go to “Chart #2” and change the range, charts 2, 3, and 4
update properly, but not #1.
From that moment forward, any chart that then updates, neither Chart #1
nor #2 will update.
So, everything works until we click inside a given chart. From that moment
forward, no range changes to that chart appear to take effect.
We added a line inside the event handler to change “options.title.text”
to a random value to confirm that each chart is getting properly activated
with the desired “min/max” changes, and the title DOES change even if the
range no longer changes.
Also, it may be worth nothing that if we have previously clicked on a
range button (1m / 3m /6m, etc) in a given chart, even thought that chart
never updates, the range button DOES un-highlight as expected when another
chart updates it.
If you need a copy of the test page we have, we can provide that via a
There was an issue in setting minimum & maximum of slider programmatically using set method after changing the range manually. We have just released StockChart v1.0.7 with this bug fix. Please refer to the release blog for more information. Do download the latest version from download page & let us know your feedback.
If you are still facing issue, kindly create JSFiddle reproducing the issue you are facing with sample / dummy data and share it with us so that we can look into your code / StockChart options being used, understand the scenario better and help you out.
You must be logged in to reply to this topic.