SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
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
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:
Does the above make sense? Please let us know if you have any questions,
Please login first to submit.