I successfully build trader chart from nice example “2D Charts -> Create Stock Charts -> Using SciStockChart”.
Then I had to draw line on the chart with candles, but the problem was, that the line didn’t have data on some dates (there is data for lots of candles, but for the red line there is only 4 points: A,B,C,D), and result i want in shown here (solved):
XAxis: CategoryDateTimeAxis (Dates)
YAxis: NumericAxis (Prices)
Candles: FastCandlestickRenderableSeries (OhlcDataSeries<DateTime, double>)
Red Line: FastLineRenderableSeries (XyDataSeries<DateTime, double>)
CategoryDateTimeAxis type ignores the XAxis values for computation of x-coordinate, and choosing only the index of the value instead. CategoryDateTimeAxis vs DateTimeAxis. I have N-number of candles and only 4 values for red line. How to receive line with no gaps, with points on their places (dates on X-axis) ? I can’t use simple DateTimeAxis, because candles don’t draws.
1) Use double.NaN for each date (x-axis value) if no data for the red-line on date given.
2) In FastLineRenderableSeries set DrawNaNAs = LineDrawMode.ClosedLines (if don’t use this flag, you will receive something like this: WPF Chart Gaps (Nulls) in Series
Thanks a million to Julia Skorobogata from SciChart!
- Andrey Гевин asked 6 years ago
- last active 6 years ago
I have the requirement of using a line series, but not displaying certain data points in the series (essentially breaking the line between points).
Do you have any recommendations on how to do this?
- morseja asked 9 years ago
- last active 9 years ago