APSIMInitiative / ApsimX

ApsimX is the next generation of APSIM
http://www.apsim.info
Other
132 stars 161 forks source link

Chart legend not cleaning up after itself #3471

Closed jbrider closed 5 years ago

jbrider commented 5 years ago

Changing the Data Source for a series from 1 excel file to another excel file results in entries in the legend for both excel files.
Issue persists after a program restart, so most likely not clearing previous series on the combo selection of the 2nd excel file.

hol430 commented 5 years ago

This seems to work ok for me...do you have an example .apsimx file which reproduces this problem?

jbrider commented 5 years ago

If the image shows up - I thought it might be saving old data in the series settings - but this is a brand new chart. It's showing 4 legend entries for 1 series. The first one is another imported excel file that isn't set as the data source. I have noticed it since the json conversion, but it could have been doing it before. This is inside the sorghum prototype, in the process of committing the latest version of that file...

image

jbrider commented 5 years ago

The problem is still there. Where there is more than one excel file available in the datastore it seems to get confused. SorghumLeaf in the sorghum prototype folder is full of good examples.

hol430 commented 5 years ago

3527 did indeed fix this but it appears to have caused a lot of problems elsewhere. I'm re-opening this so I can revert the change and find a better solution.

hol353 commented 5 years ago

Had another look at this and can't reproduce it: image If I get rid of the 'Vary by SimulationName' then it shows only one series with one legend entry 'Series'

jbrider commented 5 years ago

I'll try clearing it and see if it fixes it. Didn't think of it yesterday until after I had gone back a couple of commits to get a working graph.