SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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

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
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
Showing 2 results
Your Answer

Please first to submit.