Plot disappear in demo (oxyplot-a53ac6bf18cf )

Mar 12, 2014 at 5:28 PM
OxyPlot WPF Example browser,

Open any plot, click "code" tab, and click "Plot" tab again, plot disappear,
This not only happens on demo, but also in avalondock.

in avalondock, it was able to show plot if window is floated. but now cannot show plot.

Mar 12, 2014 at 5:59 PM
Edited Mar 12, 2014 at 6:01 PM
I see this problem too. I just updated to the latest version today 2014.1.245.1 and am experiencing odd behavior with the plot disappearing randomly when displayed with the tab control in WPF. In my application I have about 10 different tabs, each with a separate OxyPlot control. All the plots display fine, but at some random point as I'm clicking through the tabs, the plot will disappear, and once this happens, all the plots disappear, even if they have already been rendered previously.
Mar 12, 2014 at 7:07 PM
There is another I think related problem on previous version, oxyplot_8ef807c53c7f,
WPF demo browser's "Add annotations" in "Mouse event" group, once click "Code" tab, and back to plot tab, mouse event won't update plot while mouse moving.

  1. Run oxyPlot.WPF Example,
  2. Select "Add annotations" in "Mouse events" group.
  3. Click "Code" tab,
  4. Click "Plot" tab.
  5. Use mouse to draw arrow, the arrow won't update during mouse moving.
How should we debug this and contribute?

Mar 12, 2014 at 7:43 PM
Issue is in Plot.cs:
line 777 should be removed, then it works ;-)
Mar 12, 2014 at 7:56 PM
Such a big library really cannot find out why if not familiar with it.

Mar 12, 2014 at 10:26 PM
I have checked in some changes, it seems to solve all these problems. I will try to get the NuGet packages updated (having some internet connection problems, will try to push over a mobile line)

tibel: the intention with currentlyAttachedModel was to keep track of the PlotModel that is currently attached to the Plot control. This can also be the internalModel that is used when Model is null. When the control is unloaded, the currentlyAttachedModel should be null. I added a currentModel property that can be used in the UpdateModel method. Or do you see better ways to solve this?

sharethl: I think the add annotations example is working again now :-) great to hear you would like to contribute! see for more information
Mar 13, 2014 at 7:32 AM
Look more complex to me, but it's ok.

Only one thing:
ActualModel property should also use currentModel instead of this.Model.
Mar 13, 2014 at 10:53 AM
thanks, I checked in a fix. Also see the unit tests. We should add similar tests for the Invalidate/Update functionality too.