Pre loader

VerticalLineAnnotation Y intercept with chart

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

Is there a way to find out what the Y value is where the VerticalLineAnnotation intersects the line chart that it is crossing over?

Edit: The attached image shows these intersections. I would like to know how I can get a hold of those y values.

Images
  • You must to post comments
0
0

Very good question

VerticalSliceModifier.SeriesData.SeriesInfo exposes a collection of SeriesInfo – viewmodels for tooltips. However, it is difficult to determine which are for which slice.

You might have to do some custom coding to achieve this. Can you share why you want to do it? (What’s the requirement)

Best regards,
Andrew

  • Ryan Woods
    I would like to do this to bind the Y1 and Y2 values of a LineAnnotation to the Y intercepts of two VerticalLineAnnotations. I have almost got it working, but if there is more than one series of data, then it uses the incorrect value. Right now, I have: Y1=”{Binding ElementName=sliceModifier, Path=SeriesData.SeriesInfo[1].YValue, FallbackValue=0}” and this works great if only one series is visible. The moment I make a second series visible on this chart, it fails to find the correct Y Value.
  • Andrew Burnett-Thompson
    SeriesInfo does have the RenderableSeries, so I guess using a converter, you could bind to SeriesData, and pass in a SeriesName as string. Then search in c# code in your converter for SeriesData.SeriesInfo.FirstOrDefault(s => s.RenderableSeries.DataSeries.SeriesName == seriesName).
  • Ryan Woods
    That is exactly what I wound up doing except I used a skip(Number).FirstOrDefault to find the appropriate series.
  • Anil Soman
    @Ryan – When I add below line, my vertical line annotation height becomes very small and it aligns to top of chart. Y1=”{Binding ElementName=sliceModifier, Path=SeriesData.SeriesInfo[1].YValue >>> sliceModifer is my VerticalSliceModifier control under ModifierGroup.
  • You must to post comments
Showing 1 result
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