Hello dear SciChart team
I am using your SciChart in my WPF project very well. It’s very wonderful. And I have one problem how to implement this chart using SciChart. I made a chart to show the market data real time and want to make a background be shaded on when special time frames.
I tried on some ways but can’t solve that problem. I attached the image file that I want to make.
Please help me.
Thanks!
- Bruce Juli asked 3 years ago
- You must login to post comments
Hi Bruce
There’s a few ways of doing this. Some are talked about in this thread here:
DateTimeAxis, Bands for special days (i.e. Saturday, Sunday, BankHolidays,… )
There is also an API you can use to hack directly into the axis band shading here:
Axis Styling – Chart Shading with Axis Bands API
var axisBandsProvider = new NumericAxisBandsProvider();
var fillColor = Color.FromArgb(55, 255, 12, 18);
axisBandsProvider.AxisBands.Add(new AxisBandInfo<DoubleRange>(new DoubleRange(1, 3), fillColor));
axisBandsProvider.AxisBands.Add(new AxisBandInfo<DoubleRange>(new DoubleRange(6, 9), fillColor));
XAxis.AxisBandsProvider = axisBandsProvider;
Let us know if this helps!
Best regards,
Andrew
- Andrew Burnett-Thompson answered 3 years ago
-
Thanks for you response. I am using SciStockChart variable in my code. But I can’t find AxisBandsProvider at SciStockChart.XAxis, can only find AxisBandsFill. What did I wrong? Can you explain about this? Thanks
-
You will need to use the more configurable SciChartSurface to use this API. Best regards, Andrew
-
Could you explain more detail what should I configure about ScichartSurface?
-
Basically SciStockChart is a specialised subclass of SciChartSurface – designed to be used in one case only. Anything that is achieved in SciStockChart can be achieved with SciChartSurface. If you want ultimate configurability, look at the SciTrader example in our examples suite which shows how to use the SciChartSurface in a stock chart application https://www.scichart.com/example/wpf-chart-example-scichart-trader-demo/
- You must login to post comments
Please login first to submit.