-
Notifications
You must be signed in to change notification settings - Fork 594
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
Comments
Might be related to #1365 |
Yep, didn't found this because of bad search skills... ;) |
I am not able to reproduce this issue, it seems that everything work as expected for me: Can you please provide a complete and minimal example where I can reproduce the issue? @network-interface-controller I think that is a different issue, I'l;l reply there with the details. |
I will close this for now because Iw as not able to reproduce, but feel free to reply or create a new issue if it persists. |
Thanks for your response. At the moment I am building an app where I am able to show you this behavior. The original App is to big to show. |
Okay, so I was able to reproduce it in a small app which you can download here: https://github.com/Daimonion1980/livechartsDemo/tree/main At first I was not able to reproduce the behavior because I just added PlotData and did not mange the axes manually. But after adding the code to manage the axes and the ScalesYAt Property the last Plot is not removed correctly. Please check the readme in the repo with the description to see the problem. If you are not able to reopen this issue I can create a new one. |
Thanks for the repo! I tried it and yes, I was able to reproduce the issue, this is related with a bug on toggling the series visibility, this is already fixed with #1656 and will be included in the next version of the library. I will close this for now because this is fixed already in the dev branch and there is a similar issue #1164 where we can track this issue, thanks again! |
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)
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:
After removing (e.g. Plotdata.Clear(), XAxis.Clear(), YAxis.Clear()) all elements from the collections and lists:
The text was updated successfully, but these errors were encountered: