Pre loader

VerticalLineAnnotation Width parameter seems broken

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

The following code works just fine in SciChart 3.3, 3.6. Since 4.2.5 up to 6.0 it does not show a line any more, even if you pinch zoom into the chart.

Width values of 1,2,3,4 do not work regardless of screen resolution.

I used the same XAML in 3.3.0 and 4.2.5 – screenshots in attachment. I cannot access 3.6 any more (separate forum post), however I have an old version of my customer project and it worked there too. This seems to have become broken since 4.x.

        <SciChart:SciChartSurface.Annotations>
              <SciChart:VerticalLineAnnotation 
                      X1="{Binding Dummy}"
                      Width="1">
                  <SciChart:AnnotationLabel Text="{Binding DummyText}"/>
              </SciChart:VerticalLineAnnotation>
          </SciChart:SciChartSurface.Annotations>
  
Version
6.0
Images
  • You must to post comments
0
0

Hi Thomas

Why do you set width? This is an unsupported use of the property. Set StrokeThickness instead to change the line thickness.

Look at our examples which use verticalLineAnnotaion and you’ll see it works well, when used correctly.

Best regards
Andrew

  • You must to post comments
0
0

Hi Andrew,

Reading the documentation I did not get the impression that Width was not supported.

https://www.scichart.com/documentation/win/current/SciChart.Charting~SciChart.Charting.Visuals.Annotations.VerticalLineAnnotation_members.html

There it is stated:
“Public Property Width Gets or sets the width of the element. (Inherited from System.Windows.FrameworkElement)”

And the parameter does indeed alter the width of the line. In 3.6 it worked very well.

So if it is not supported, that is not clear from the docs.

/Tomasz

  • You must to post comments
0
0

I will for sure use StrokeThickness in the future. However the code I am supporting was written 3 years ago, and I do believe those examples were not available then. I used what made sense, and worked for me.

Sorry if that is against intended use, I can try to correct it now.

  • You must to post comments
Showing 3 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