Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Two charts and one preview in ZingChart

I have 2 charts that have the same x-axis, I want one preview and when I scroll that, the 2 charts should scroll at the same time, is this feature available in ZingChart?

like image 888
Marium Malik Avatar asked Jul 27 '15 04:07

Marium Malik


1 Answers

This demo should include all the elements you need:

  • 2 charts that share an x-axis
  • A preview window that controls the two charts
  • A scroll bar that controls both charts and the preview window area

You can view the source in the demo to see that we added:

  • {graphset: [ ]} to create a collection of charts in a single container
  • zooming: true to the scaleX object for each chart
  • zoom: { shared: true } for each chart to enable sharing

  • scrollX:{ } to the second chart to add the scroll bar

  • crosshairX:{ shared: true } for shared labels when hovering over the data points

I’m on the ZingChart team. Please let me know if this demo answers your question or if there is additional clarification I can provide.

like image 148
Elizabeth Avatar answered Oct 20 '22 15:10

Elizabeth