Impact of changed binding collection to rendering of existing objects

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
Micha_el
Posts: 7
Joined: Wed Nov 15, 2023 12:25 pm

Impact of changed binding collection to rendering of existing objects

Post by Micha_el » Tue Mar 12, 2024 1:13 pm

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?

ArctionKestutis
Posts: 555
Joined: Mon Mar 14, 2016 9:22 am

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

Post by ArctionKestutis » Wed Mar 13, 2024 8:35 am

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.

Post Reply