mysticfall / pivot4j

Pivot4J provides a common API for OLAP servers which can be used to build an analytical service frontend with pivot style GUI.
Other
128 stars 101 forks source link

Images are not rendered #198

Open mariogaitan opened 8 years ago

mariogaitan commented 8 years ago

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.

mysticfall commented 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!