SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & 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!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

Answered
1
0

Our current graphs have an additional data series to highlight the 0, or break-even line. How can I do that using SciChart without adding a data series (which would be included in the rollover feedback)?

  • You must to post comments
Best Answer
1
0

UPDATE: Using Annotations feature (v1.5 and greater).

Using the Annotations Feature a zero line can be achieved with the following XAML on a chart:

<s:SciChartSurface.Annotations>
                
    <!-- Draws Bands behind an axis. Assumes there is a YAxis with ElementName myAxis -->
    <s:BoxAnnotation CoordinateMode="RelativeX" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=myAxis}" Y2="{Binding VisibleRange.Max, ElementName= myAxis}" Background="#11000000" AnnotationCanvas="BelowChart"/>

    <!-- Draws the zero lines for an axis. Assumes AxisId of the YAxis is myAxisId -->
    <s:HorizontalLineAnnotation Y1="0" YAxisId="myAxisId" HorizontalAlignment="Stretch" StrokeThickness="1" AnnotationCanvas="BelowChart"/>
</s:SciChartSurface.Annotations>

This technique is demonstrated in the Vertically Stacked Axis example.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.