Hi! I’m developing a data visualization tool for traders and I’m running into an issue when I try to add Data to the chart on both sides (beginning and end of OhlcDataSeries).
When I add data to the end of the chart it works fine, but when I tried adding data at the beginning it is not drawn in the chart and the appearance of the candlesticks changes to a flat line (look at the attached pictures).
I’m using a basic SciChartSurface with a DataTimeAxis as X and NumericAxis as Y. Both axes have AutoRange turned ON.
I’m using the Append() function to add the data, so that might be the issue. Should I use Insert or what solution would you recommend?
This functionality of adding data on both ends of the chart is very important because I’m listening to live market data while querying historic data from the DB as requested by the user.
Yes, you should use Insert(..) to achieve this. Please, take a look at these threads: Add candles to begin and to the end and How to prepend historical data in real-time chart. Also notice, that there also InsertRange(..) method exists in IOhlcDataSeries, which works faster.
Hope this helps!
Please login first to submit.