You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have a series that I want to make visible or invisible by checking a box. It is a simple project with XAML and the "code behind" .cs file. When I'm checking or unchecking the box, the IsVisible property changes it's value properly to true or false depending on the action. OnPropertyChanged() fires too, but it's handler is always null no matter if I set MainChart to something new or change the isVisible value.
In the other question on stack I saw that someone suggested that using ItemSource helps, but I'm not sure how I can use it in code behind and it also seems that simply invalidating the plot should work.
The project itself consists of multiple files but I think 2 are essential to the problem:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have a series that I want to make visible or invisible by checking a box. It is a simple project with XAML and the "code behind" .cs file. When I'm checking or unchecking the box, the IsVisible property changes it's value properly to true or false depending on the action. OnPropertyChanged() fires too, but it's handler is always null no matter if I set MainChart to something new or change the isVisible value.
In the other question on stack I saw that someone suggested that using ItemSource helps, but I'm not sure how I can use it in code behind and it also seems that simply invalidating the plot should work.
The project itself consists of multiple files but I think 2 are essential to the problem:
MainWindow.xaml:
MainWindow.xaml.cs:
Chart inherits from OxyPlot.PlotModel.
LeftLegPressureLineSeriesVisibility looks like this:
NeoracerLogsExplorer_SentToInternet.zip
I'm sending the whole project if you need to test it. I'll answer any questions if you need to know more.
UPDATE:
It seems that invalidatePlot doesn't recognize the plotView because
this.PlotView
is null here :It's in PlotModel class.
Did I construct my custom series wrong ? Are there any rules to do it ? Any ideas ?
Beta Was this translation helpful? Give feedback.
All reactions