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’m not entirely sure I’m approaching this the right way, but we’re having an issue with two different but similar situations. The first is drawing lines on the chart, which create regions on the chart, and the second is to connect two different points together with a line.
In both scenarios we need to draw quite a few lines on the chart surface, the problem is that the line series does not draw lines separate from each other, just one line connected, for example, if i need to draw to parallel lines:
——————— Line 1
——————— Line 2
Like that, the series will connect them and make a Z line instead.
The problem is that if we need to draw 5 lines to connect a 1000 points together, we need to add 500 fast line series to the chart surface and that slows down the performance significantly.
Is there a property somewhere that we missed? Or a series that we can use that does not connect all the lines together ?
Thanks in advance!
I think you can do this using double.NaN to break line segments.
e.g. if you create a single FastLineRenderableSeries, with XyDataSeries, and append data like this:
// given yValue1, yValue2, yValue3 are three threshold lines // given xMin, xMax are some defined contants like -100000000 + 10000000 xyDataSeries.Append(xMin, yValue1); xyDataSeries.Append(xMax, yValue1); xyDataSeries.Append(xMax, double.NaN); xyDataSeries.Append(xMin, yValue2); xyDataSeries.Append(xMax, yValue2); xyDataSeries.Append(xMax, double.NaN); xyDataSeries.Append(xMin, yValue3); xyDataSeries.Append(xMax, yValue3);
The double.Nan breaks the line segment so you should get three horizontal lines.
Want to try it?
Please login first to submit.