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 edited 7 years ago
-
The HorizontalLineAnnotation is well within the range I am setting manually.
- You must login to post comments
Thanks Andrew… I eliminated binding and range as the issue I think…
If I set AutoRange to Auto all is fine but not what I want, if I set AutoRange to Once – I have lines but then my binding will not update range properly. If I set it to Never binding works as expected but no Horizontal Lines… I’m not making any other code changes here just changing the AutoRange property.
I worked around this by manually drawing the lines from code and leaving AutoRange set to never.
If I ever figure it out I’ll post back.
- Paul Richardson answered 7 years ago
- You must login to post comments
Hi Paul,
I’m afraid I can’t reproduce this. In the ‘Annotations are Easy‘ example, I set the YAxis.AutoRange to Never. All the annotations appeared as expected.
The only thing I can think of is your VisibleRange binding is failing, or providing an invalid range. This would mean the chart has no range to display and hence no annotations will display.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 7 years ago
- last edited 7 years ago
- You must login to post comments
Please login first to submit.