Page 1 of 1

Impact of changed binding collection to rendering of existing objects

Posted: Tue Mar 12, 2024 1:13 pm
by Micha_el
Hi,

I have a WPF binding to a collection of YAxis and a collection of PointLineSeries like this

<lc:ViewXY YAxes="{Binding YAxisCollection}" PointLineSeries="{Binding PointLineSeries}"

When adding or removing single AxisY or single PointLineSeries to their corresponding collections what happens with the chart control regarding a refresh/redraw of the existing AxisY or PointLineSeries.
In other words, are the existing AxisY or PointLineSeries rendered again when new collection objects are added or do they stay untouched?

Re: Impact of changed binding collection to rendering of existing objects

Posted: Wed Mar 13, 2024 8:35 am
by ArctionKestutis
The short answer: a) change in collection size will trigger Chart rendering (i.e. new frame); b) only relevant object's draw-data is (re)created (not everything).

Creating draw-data for each charting object and creating chart-image from all that draw-data are two independent processes.

Adding/removing Series is quite straightforward - only Series is changed, not collection.
However, AxesCollection is not that simple. If adding/removing axis will change segment size, margins size or similar, then old drawdata is invalidated and need to be recreated.

It seems to me that there is different underlying question, but I did not understand it yet. For more in details discussion, you may write to [email protected] with license ID.

Hope this helps.