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


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.

  • You must to post comments

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,

  • 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
    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.

SciChart WPF v6 BETA released! Note pricing/licensing changes are coming. Contact us to beat the rise!Read more