Pre loader

HorizontalLineAnnotation won't draw if AutoRange is set to "Never"

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

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" />
Version
4.2.2.9777
  • Paul Richardson
    The HorizontalLineAnnotation is well within the range I am setting manually.
  • You must to post comments
0
0

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.

  • You must to post comments
0
0

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

Images
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies