SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
I am using the 2D heatmap as follows:
mData = new double[dataSize, dataSize]; DataSeries = new Heatmap2DArrayDataSeries<int, int, double>(mData, x => x, y => y);
In my application the displayed data size can be changed by the users – e.g. 200 x 300, but there is also a known maximum size – e.g. 500 x 500 for the data. Since I would like to avoid unnecessary large object allocations, is there a way for me to reuse the data buffer and display only the required data?
I tried setting the visible range over the data that would need to be displayed, which worked, but unfortunately the performance is still the same as when rendering the maximum size image. Is there any other way to achieve the goal?
How often are you changing data size? Why not pre-cache a few known sizes if you are concerned about memory allocation when changing size?
A 500×500 array is only 2MBytes and unless you are changing the size 60 times a second it shouldn’t be a problem.
Please login first to submit.