Hello!
Great work, thanks a lot for this framework!
Could you provide an example of animated inserting of a new point? My goal is to implement interpolation between previous retrieved and last point on the real-time line chart.
- Alexander Edunov asked 8 years ago
- last active 2 years ago
I’m trying to merge xvalues of two data series (both must have equals xvalues).
First, i get a keys – collection of different keys, and want to insert this keys into second data series.
using (ds.SuspendUpdates())
{
int keyIndex = 0;
int dsIndex = ds.FindIndex(keys[0], SearchMode.RoundUp);
while (dsIndex < ds.XValues.Count)
{
if (keyIndex >= keys.Count) break;
if (ds.XValues[dsIndex] > keys[keyIndex])
{
ds.Insert(dsIndex, keys[keyIndex], Double.NaN);
keyIndex++;
}
dsIndex++;
}
}
But if ds.XValues.Count = 1200000 and keys’s count = 200000, that this method work to much time.
Complexity of this method is O(n), so i want to know what is performance (complexity) of data series insert method?
- Ivan Zakharov asked 9 years ago
- last active 9 years ago
I have XyDataSeries
with 50 data points and I’m trying to insert another 50 data points to index 5. The same values can be inserted as a range to the beginning of the data series or inserted one by one starting from index 5. But they fail with “RuntimeError: memory access out of bounds” whenever I try to insert them as a range from index 5.
Code snippet:
const { xValues, yValues } = generateData(50);
const dataSeries = new XyDataSeries(wasmContext, { xValues, yValues, isSorted: false });
sciChartSurface.renderableSeries.add(new FastLineRenderableSeries(wasmContext, { dataSeries }));
// this works
dataSeries.insertRange(0, xValues, yValues);
// this works
for (let i = 0; i < xValues.length; i++) {
dataSeries.insert(i + 5, xValues[i], yValues[i]);
}
// this fails
dataSeries.insertRange(5, xValues, yValues);
Codesandbox link: https://codesandbox.io/s/scichart-js-boilerplate-forked-hokfcn
I wonder if I’m doing something wrong or if this is an actual issue?
Side note: Index 5 is just an example, because it seems I can use the insertRange
method when inserting to index 0-2, but it fails when inserting to index 3+ (in case of a chart with 50 existing data points)
- Timo Betina asked 1 year ago
- last active 1 year ago