Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Fix: performance issue in LiveCharts.Wpf.DefaultLegend #1125

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Maximilian-Renner
Copy link

Summary

Fixed a performance issue in the DefaultLegend. Whenever the setter of the property "Series" was called, the PropertyChanged event was invoked, which leads to a redrawing of the whole legend. In my demo project, I had plotted about 35 different lines in a CartesianChart and updated it every 10ms with multiple sensor data. The redrawing of the legend, whenever a new sensor data item is available, would completely freeze the UI. Applying the fix, legend is still up-to-date and UI won't freeze.

Solves

  • performance issue caused by not required updates of the chart legend

Fixed a performance issue in DefaultLegend. PropertyChanged event for property "Series" was invoked every time, even if no item in the series list has changed. In charts with a huge amount of lines with a lot of data, this will trigger the redrawing of the legend so many times, that it will freeze the whole UI.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant