Open mariogaitan opened 8 years ago
Probably, it makes sense to treat null
as equivalent to zero in a pie chart, but I'm not sure if it could be generalized to cover other charts as well. So, I'd like to clearly understand where and when this happens before I follow your suggestion.
Could you tell me when this problem happens? If you see a NullPointerException
, a full stacktrace would definitely help me understand the issue. Thanks!
When data is null, the charts are not rendered, I fix that problem changing some classes:
In classes org.pivot4j.analytics.ui.chart.AbstractSeriesChartBuilder and org.pivot4j.analytics.ui.chart.PieChartBuilder in procedures public void renderContent(ChartRenderContext context, String label, Double value) and public void renderContent(ChartRenderContext context, String label, Double value) respectively I added a check: null values are changed by zero (new Double(0)), and everything works right.