TimeChart icon indicating copy to clipboard operation
TimeChart copied to clipboard

Zoom/Pan multiple traces

Open sleighsoft opened this issue 5 years ago • 1 comments

Is it possible or can you guide me on how I could use TimeChart to create multiple traces which zoom/pan all together when panning / zooming one of the traces.

Great library btw :)

sleighsoft avatar Sep 29 '20 18:09 sleighsoft

Currently no built-in support.

To implement this, we need every chart.model to reference the same scale object. https://github.com/huww98/TimeChart/blob/fb4699b8f8f5e0d3e97c602bcb245e243f769200/src/renderModel.ts#L27-L28

Then trigger an update() for all charts when users interact with any chart. https://github.com/huww98/TimeChart/blob/fb4699b8f8f5e0d3e97c602bcb245e243f769200/src/index.ts#L128-L133

huww98 avatar Sep 30 '20 10:09 huww98