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!

Answered
3
0

Hi,

I am trying to build a chart with two series in it. One is an OHLC chart with the time on the X axis and price on the Y Axis. The other is an Bar chart with the price as the X Axis and an integer scale for the YAxis. The bar chart will need be have horizontal columns though which will need to align with the prices on the OHLC series. I have attached an image here with what the chart should look like, is there a way to achieve this ?

Images
  • You must to post comments
Best Answer
3
0

Hi Deepak, Andrew

There is also another way of achieving this. SciChart allows you to build “mixed charts”, where you have two X axis with different orientation. I compiled a small sample for you, maybe you will find it a bit easier to implement. Please, find the code and screenshot attached.

Also, you can find the example of a histogram implementation in this post.

Hope this helps!

Best regards,
Yuriy

Attachments
Images
  • deepakb1
    Yuriy,Thanks for your example, I was able to get it to work. I do have one issue, I'm trying to get the XAxis of the histogram aligned with the YAxis of the candlestick, this is so that the user can relate the histogram to the corresponding point in the candlestick. Is there any way to achieve this. I have attached a screenshot of the chart. I have made the x-axis of the histogram visible. You will see that the YAxis of the candlestick and the x-axis of the histogram are out of sync. I guess what I'm asking is there a way for the YAxis of the candlestick to share an axis with the XAxis of the histogram.Thanks, Deepak
  • Yuriy
    Hi Deepak,Try binding both of them to some shared VisibleRange, or XAxis.VisibleRange to YAxis.VisibleRange. This technique is used in most of our MVVM examples, e.g. the Sync Multi Chart Mouse example.Please, let us know if you get it working.Best regards, Yuriy
  • deepakb1
    Andrew and Yuriy, that worked. Your help is much appreciated.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.