SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

0
0

Hi there,
I have the following challenge:
I have two time-based stock charts. One standard candle-chart (1-day period) and one renko-chart.
Renko-chart has different scaling and is also not linear on the x-axis.

What I want to achieve is a synchronization of both charts when moving one of the charts.
* Moving candle-chart -> middle of the renko-chart should jump to the middle time-value of the candle-chart
* Moving renko-chart -> middle of the candle-chart should jump to the middle time-value of the renko-chart

I created two separate controls for this (L10 Presentation Layer\L10x2 Controls WPF\Charts) and places them in one container control (L10 Presentation Layer\L10x2 Controls WPF\Charts\ctlCharts)

Thanks and Regards

Michael

Attachments
  • You must to post comments
0
0

Hi Michael,

Please accept our apologies for not answering this thread sooner. I haven’t investigated your project deeply because it looks quite complex, but I think I have an idea for you to try.

You could create a custom modifier which will synchronize two CategoryAxes. The peculiarity of CategoryAxis is that it operates indexes, not actual data. So you could calculate required VisibleRange change (which is IndexRange) of one axis based on VisibleRange changes on the other axis. To do this, you should handle the VisibleRangeChanged event, check for index range changes inside the handler, then compute amount of indexes the other axis should be scrolled by to be in sync using the BarTimeFrame property. To apply the change, you should call the ScrollByDataPoints(..) method on this axis.

You can find couple of articles on modifiers API and custom modifiers in our Knowledgebase:
http://support.scichart.com/index.php?/Knowledgebase/Article/View/17234/32/custom-chartmodifier-api—overview
http://support.scichart.com/index.php?/Knowledgebase/List/Index/32/chartmodifiers-zooming-panning

Does the above make sense? Please let us know if you have any questions,

Best regards,
Yuriy

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.