Iceberg-Charts icon indicating copy to clipboard operation
Iceberg-Charts copied to clipboard

Error in y range in ChartUtils

Open BacharelMarlon opened this issue 3 years ago • 0 comments

My english isn't so good, please forgive me. Multibar XYChart throws an error if there's only one serie or multiple series with the same maximum Y. It occurs because the DataPoint.y is set with the maximum value of the DataPointBar.y in DataPointMultiBar.getMaxYValue(ArrayList<DataPointBar> bars). When the data range of Y is calculated (ChartUtils.calculateYAxisMax and ChartUtils.calculateYAxisMin), the max and the min is the same, so when the initial interval would be defined, the function ChartUtils.getInterval(DamultaRange dr) throws an error. I think an "if statement" verifying if the series is a MultiBarMode.SIDE_BY_SIDE, and a specific iteration, should correct it.

Thank you for your time.

BacharelMarlon avatar Aug 30 '21 23:08 BacharelMarlon