Is there an efficient way to append a subset of an array to a DataSeries? Manually looping with Append is slow (as expected). Iterating over an IEnumerable introduces overhead. I’ve read in the performance tips and tricks section that “Arrays have the biggest impact as these can be indexed using unsafe code”. The help documentation doesn’t list an Append overload specifically for an array so I assume the type is checked within the method.
I am reusing arrays whenever possible; however, my arriving data is not always the same length. In order to reduce allocations and garbage collection, I make use of Memory, Span, and ArraySegment elsewhere in my project. This allows me to pool and reuse memory. I have not found any DataSeries.Append overloads that would accept any of these types or otherwise allow me to specify the usable range of the array. Please let me know if I’ve overlooked something.
I have a fast column renderable series where a column is added each hour. When the first column is added, it renders approximately half the graph (regardless of zoom), which is unintended. Once the data point for the second hour is added, the column collapses down to the space of the hour (as we would want). Why is the first column rendering too wide? Am I failing to set a parameter that is required?
Below is my series setup:
val uoColumnSeries = generateColumnRenderableSeries(LABEL_ID_UO, uoColumnDataSeries, SolidBrushStyle(uoColumnColor)) uoColumnSeries.dataPointWidth = .95 uoRenderableSeries.add(uoColumnSeries)
Attached is how the data renders with 1 point (zoomed in and out), and data render once second point (of height 0) is added. The graph in question is the column graph at the top in yellow.