Iceberg-Charts
Iceberg-Charts copied to clipboard
Error in y range in ChartUtils
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.