SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
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.
I have some XyDataSeries<DateTime, double> showing some data on my chart. Also I have 2 vertical line annotations (red and blue) where I know the two DateTime values.
Is there a effective way to get the double values between this range of each XyDataSeries.
Yes there is, you want to use the DataSeries.FindIndex method.
int FindIndex(IComparable x, SearchMode searchMode)
Finds the index to the DataSeries at the specified X-Value, where
– x = The X-value to search for
– searchMode = The Abt.Controls.SciChart.Common.Extensions.SearchMode options to use. Default is exact, where -1 is returned if the index is not found
Then, you want to query the DataSeries.YValues array between these indices. make sure you cast your Dataseries to XyDataSeries<DateTime, Double> to get the strongly typed YValues array
Please login first to submit.