SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
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>
Hi again!
I’ve struggled with this for some days (while working with other stuff).
Now I found the “bug”.
I have added a PointMarker to the graph. I have the intention to use it for changing the size of the PointMarker dynamically so that they are larger when zoomed in.
That binding isn’t working yet. This made the graph doing a lot of strange things. When i commented out those lines, everything worked fine (see the lines below).
Another strange thing I saw on one version of my sw, with the lines below, was the following. The annotations worked as they should while the graph data was outside the graph view.
<s:FastLineRenderableSeries.PointMarker>
<s:EllipsePointMarker Width="{Binding PointSize}" Height="{Binding PointSize}"
Fill="SteelBlue" Stroke="LightSteelBlue" StrokeThickness="1"/>
</s:FastLineRenderableSeries.PointMarker>
I guess that this issue is solved. But you may want to prevent this in the future!?
Please login first to submit.