Describe the bug
- Have an XYChart with one ErrorDataSetRenderer, and multiple datasets assigned to it.
- Ensure that one of the datasets is empty
- Have auto-ranging enabled
- The rendering pass will loop endlessly and the Chart is constantly seen is dirty (
state.isClean() returns false)
To Reproduce
Reproduction steps above, but here some more detailed information:
Environment:
- OS: any
- Java version: any
- JavaFx version: any
- ChartFx version: master
Describe the bug
state.isClean()returns false)To Reproduce
Reproduction steps above, but here some more detailed information:
XYChart#updateAxisRangeis called, during whichrenderer.updateAxisRangeis called for all datasets, including the empty one.AbstractDataSet.recomputeLimits- which for the empty dataset ismin = NaNandmax = NaNsetMinandsetMaxdelegate to theDataRange(https://github.com/fair-acc/chart-fx/blob/main/chartfx-dataset/src/main/java/io/fair_acc/dataset/spi/DataRange.java#L259)NaN == NaNis always false. So this code section sees the data range as changed every time, causing the state to be dirtied via https://github.com/fair-acc/chart-fx/blob/main/chartfx-dataset/src/main/java/io/fair_acc/dataset/spi/DefaultAxisDescription.java#L198Environment: