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

0 votes


I need help in adding multiple Horizontal Line Annotations to my chart.

My chart has multiple data series and hence the need for multiple annotations. I have the following code but it does not seem to work.

Not even one Annotation gets displayed.

Please help !

<s:SciChartSurface RenderableSeries="{Binding ChartRenderableSeries}" Annotations="{Binding ThresholdCollection}" >
                <s:DateTimeAxis  AxisTitle="Time" VisibleRange="{Binding Settings.XVisibleRange, Mode=TwoWay}" />
                <s:NumericAxis AxisTitle="Values" VisibleRange="-30,30" AutoRange="Always"/>

public ObservableCollection<HorizontalLineAnnotation> ThresholdCollection { get; set; }

Every time user adds a Threshold, the following code gets executed.

var threshholdObj = new HorizontalLineAnnotation
                Name="Threshold" ,
                Y1 = 2,
                Stroke= System.Windows.Media.Brushes.Blue
Showing 1 result
This template supports the sidebar's widgets. Add one or use Full Width layout.