I have a realtime app that will work with 5 to 8 million datapoints of timedataseries. If I have to dynamically scale multiple charts on a surface, it can be ranging from 1 to 20. upon reading the documentation I see that Subcharts and SciChartVerticalGroup are 2 possible solutions. I would have to dynamically add and remove those sub charts just like what you have shown in one of the these examples.
https://codesandbox.io/p/sandbox/sync-multi-chart-r85zv7?file=%2Fsrc%2FApp.tsx%3A235%2C28
https://codesandbox.io/s/2t9yrn?file=/src/index.tsx
What would be a better choice for performance ?
- vamsi pallem asked 2 days ago
- You must login to post comments
Hello!
To clarify, the SciChartVerticalGroup is a feature that allows synchronizing the layout alignment of multiple surfaces. It can be used both with separate surfaces and subsurfaces.
The difference between approaches:
– separate surfaces rerender independently (if one surface needs to be redrawn it won’t affect others)
– updating something on a subsurface will cause the redraw of the main surface and all of the subsurfaces attached to it
- separate charts could draw sequentially in different frames
-
subsurface render logic is executed in bulk so all of the charts are guaranteed to be drawn simultaneously
-
sub-charts are drawn on a single canvas (however the approaches could be combined)
- also sub-charts allow to add and dynamically position some HTML content around them (the SubChart Wrappers feature)
With that, depending on your use case consider the following:
– are your charts updating simultaneously?
– do you have a complex HTML layout for the chart?
– Do you have an intensive update rate for chart properties/data?
I would suggest implementing your chart setup in such a way that you could easily switch between those approaches. Because when performance is in question, the important thing is to measure and monitor some metrics to compare the solutions.
configureSurface(sciChartSurface) {
// add axes, series, annotations, modifiers, etc...
}
// ...you can use one approach
const {sciChartSurface} = await SciChartSurface.create(rootElement, options)
// or another
// const sciChartSurface = mainSurface.addSubChart(options)
// Then do the setup
configureSurface(sciChartSurface)
- Jim Risen answered 24 hours ago
- last edited 23 hours ago
- You must login to post comments
Please login first to submit.