When I load a data series into my LineChart, like linechartVar.getData().addAll(series);
I get the intended result: add series to linechart
Than, I load the same series to my AreaChart and at the same time I disable LineChart visibility. So I get this: add same series to areachart
But when I switch back to my LineChart (so disable AreaChart visibility and enable LineChart visibility) I get this: just called setVisible(false) on areachart and setvisible(true) on linechart (symbol dots are gone)
Why is that? Any help is very much appreciated.
Maybe good to know: XYChart series remains the same in the process and it is only added to Area and LineChart only once. But what I noticed is if I recalculate the XYChart series all the time I switch between these two charts the problem won't occur. (But I do not want to recalculate the series over and over again because it is always remains the same. The only thing I wanted to change is the chart "type".)
I do not understand what can cause this behavior.