Hello,
I have a wpf application that has several SciChartSurface, each of which has a DateTime axis for the x-axis.
I am currently using MVVM to bind data to the axes.
I want to display a custom band on the x-axis but am having difficulty. depending on the data there could be one or more bands to display.
For example if the date range is from 2/3/2026-2/4/2026, there may be a band that needs to be shown from 2/3 10:00-11:00 and one from 2/3 14:00-14:25.
Can you point me to any examples that may show how to accomplish this?
Regards.
- Aaron Douglas asked 3 months ago
Hello Aaron, Thank you for contacting us. To provide you with a proper solution, though, we would require additional clarification regarding the requested feature. Could you please share a picture or mockup showing the mentioned bands and tell us a bit more about the desired behavior? In particular, do the mentioned bands need to be moved depending on the DataRange change or some user input, etc. Thank you in advance, Lex S., MSEE SciChart Technical Support Engineer
- You must login to post comments
Hello and thanks for your response.
I’ve attached an image of what I’m attempting to accomplish.
This is data depicting sensor data. The band needs to be displayed at specific times based on the data.
The band that is displayed will need to be dynamic and change based on the data that is loaded.
Let me know if this helps, or if you need anything else.
Regards,
Aaron
- Aaron Douglas answered 3 months ago
- You must login to post comments
Hello Aaron,
Thank you for the clarification.
The easiest way to place the custom colored bands on the SciChartSurface would be to use Box Annotations:
SciChart WPF Documentation – The BoxAnnotation Type _ WPF Chart Documentation
For X1 and X2 coordinates, you can apply values that would determine the edges of the colored regions, while for Y1 and Y2 you can use relative coordinates stretching the annotation to the full SciChartSurface height.
To set relative coordinates, you should set the CoordinateMode property to “RelativeY” on the annotation:
SciChart WPF Documentation – AnnotationCoordinateMode Enumeration
And then use the “0.0” and “1.0” values for Y1 and Y2 coordinates.
Additionally, you can enable manual position changes by setting the IsEditable property to “True”.
For example:
<s:SciChartSurface.Annotations>
<s:BoxAnnotation Background="Red" Opacity="0.3" BorderThickness="0"
CoordinateMode="RelativeY" IsEditable="True"
X1="1.1" X2="1.15" Y1="0.0" Y2="1.0" />
</s:SciChartSurface.Annotations>

Kind regards,
Lex S., MSEE
SciChart Technical Support Engineer
- Lex answered 2 months ago
- last edited 2 months ago
- You must login to post comments
Thanks Lex.
Sorry for the delay but I’m now getting back to this project. I’m guessing this can also be done programmatically instead of through xaml, as I may have the need to have several on one graph.
- Aaron Douglas answered 2 months ago
Hi Aaron, Thank you for your reply. Sure, all the mentioned properties can be applied to the Annotation in the code, as well as the BoxAnnotation itself can be created in the code. If you need an advise on how to do this, please let us know. Kind regards, Lex
- You must login to post comments
Please login first to submit.

