0

I am currently working in a project where we want to display multiple time charts with linked time axis.

We have one chart which displays multiple series of numeric data. Furthermore, there is any number of further charts which displays exactly one series of Boolean data.

Now we want to link all time axes so if you zoom/pan/move in one of these charts, all other charts will zoo/pan/move the same.

I hope you guys can help me

Thanks

P

Le Y
  • 1
  • Welcome to stack overflow, please take a tour of the help centre and see how to ask a good question – Pete Apr 21 '16 at 08:32

1 Answers1

1

You need to use the onPositionChange event. It will fire every time the time position is updated. The within the handler of that event use time() method to move the other chart as well.

Knaģis
  • 20,827
  • 7
  • 66
  • 80
  • Hey Knaģis thanks for your answer. I tried this, but the problem is the performance. If you want to synchronize 3, 4 or more charts with this event, your browser will be unable to handle this amount of events as well as the rendering. I also tried the onChartUpdate event. This event will not so often fired, but you can’t get a synchronization done. I my tryouts the charts were never fully synchronization and always slightly out of time. Thanks P – Le Y Apr 28 '16 at 07:52
  • Are you checking that event.origin !== "api" so that you are not responding to onPositionChange that are caused by your own API calls recursively? – Knaģis May 03 '16 at 13:05