Hello,
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:SciChartSurface.XAxis>
<s:DateTimeAxis AxisTitle="Time" VisibleRange="{Binding Settings.XVisibleRange, Mode=TwoWay}" />
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:NumericAxis AxisTitle="Values" VisibleRange="-30,30" AutoRange="Always"/>
</s:SciChartSurface.YAxis>
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
};
ThresholdCollection.Add(threshholdObj);
- Parvez Mulla asked 6 years ago
- last active 6 years ago