If I set AutoRange = “Always” myHorizontalLineAnnotation draws fine. When I set it to “Never” – which I want – my HorizontalLineAnnotation won’t draw. How do I do this? ty
<s:SciChartSurface.YAxis>
<s:NumericAxis AutoRange="Never"
VisibleRange="{Binding ElementName=this, Path=YMinMax}"
<s:HorizontalLineAnnotation HorizontalAlignment="Stretch"
Y1="{Binding ElementName=this, Path=CurrentHigh}"
Stroke="{Binding ElementName=this, Path=ToleranceColor}"
StrokeThickness="1" />
- Paul Richardson asked 7 years ago
- last active 7 years ago
Hi!
I have the following xaml code for HorizontalLineAnnotations. I have a viewmodel with simple properties for WasteMaxValue etc.
I don’t get any binding errors. Sometimes everything works as expected when I start up. Sometimes the lines show up but they wont follow when I resize the view (and the graph). Sometimes the lines don’t show up at all.
If I do a very fast “pan” with the mouse so that the graph data moves outside the graph, the lines show up and they follow when I resize the view and the graph. Have you experienced this before? Is it an obvious error?
<s:SciChartSurface.Annotations>
<s:HorizontalLineAnnotation HorizontalAlignment="Stretch"
Y1="{Binding WasteMaxValue}" Stroke="Red" StrokeThickness="2">
</s:HorizontalLineAnnotation>
<s:HorizontalLineAnnotation HorizontalAlignment="Stretch"
Y1="{Binding WasteMinValue}" Stroke="Red" StrokeThickness="2">
</s:HorizontalLineAnnotation>
<s:HorizontalLineAnnotation HorizontalAlignment="Stretch"
Y1="{Binding WarningMaxValue}" Stroke="Yellow" StrokeThickness="2">
</s:HorizontalLineAnnotation>
<s:HorizontalLineAnnotation HorizontalAlignment="Stretch"
Y1="{Binding WarningMinValue}" Stroke="Yellow" StrokeThickness="2">
</s:HorizontalLineAnnotation>
<s:HorizontalLineAnnotation HorizontalAlignment="Stretch"
Y1="{Binding SetValue}" Stroke="Green" StrokeThickness="2">
</s:HorizontalLineAnnotation>
</s:SciChartSurface.Annotations>
- Jonas Larsson asked 8 years ago
- last active 8 years ago
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 7 years ago
- last active 7 years ago