Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty collection does not let the plot become invisible #1505

Open
Daimonion1980 opened this issue May 3, 2024 · 0 comments
Open

Empty collection does not let the plot become invisible #1505

Daimonion1980 opened this issue May 3, 2024 · 0 comments

Comments

@Daimonion1980
Copy link

Describe the bug
I have a WPF UserControl which implements a Livecharts BasicLine Plot and is enabled to show one or more graphs. For this I implemented a ObservableCollection and two Axis Lists. (I work with MVVMGen as boilerplate code generator)

[Property] ObservableCollection<ISeries> pLotData = [];
[Property] IList<ICartesianAxis> xAxis = [];
[Property] IList<ICartesianAxis> yAxis = [];

Adding entries to this setup works pretty well. The data appears in the UI.
When removing an element (removing the specific entry in PlotData and YAxis) the data disappear in the ui.
But when removing the last entry and clearing all Collections and Lists, so that there Length is zero
the UI held the last element and does not become invisible or collapsed. The label from the entry disappears but coordinates and the last graph is still available.

When adding new Plots to the Collections and Axis Lists the UI is rebuild.

Expected behavior
When the collection is empty, the view shall be invisible.

Screenshots
after adding some data to the collections and lists:
threee Graphs added

After removing all elements from the collections and lists:
Collection empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant