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

0
0

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!

Version
6.3.0
Images
  • You must to post comments
1
0

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

enter image description here

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

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.