Project: Birt
Bug 295947 Series with all null values are taken in account when calculating the scale
Reported: 2009-11-23 18:22:53 | Status: verified fixed

Case: line graph with a datacube, datacube has 2 dimensions (D1 and D2) and two measures (M1 and M2). Sample Data: D1, D2, M1, M2 A, 1, 18, null A, 2, 24, 35 B, 1, 22, null B, 2, 45, 37 As we can see, M2 is completely null for D2=1. Now, if we build a graph with Category on D1, Optional Y Series Grouping on D2, and Y1 series on M2. That is going to give two lines, one for D2=1 and one for D2=2, both on the same axis. Expected result: with autoscaling on Y1 axis, we have scale min=35 and max=37 Obtained result: with autoscaling on Y1 axis, we have scale min=0 and max=37 Bug: org.eclipse.birt.chart.datafeed.DataSetProcessorImpl.getMaximum and org.eclipse.birt.chart.datafeed.DataSetProcessorImpl.getMinimum estimate that a serie with all null values has a maximum (or minimum) of 0, instead of having no maximum (or minimum) In fact, in that precise case (no measures for some of the groups in the datacube), it would be better to have no serie taken in account at all, but it does not seem to be handled by Chart as of now.

Files changed in fix:
chart/org.eclipse.birt.chart.engine.extension/src/org/eclipse/birt/chart/extension/datafeed/DataSetProcessorImpl.java