Tuesday, 20 September 2011

Area Charts

NextReports will bring support for area charts. These charts are useful for measuring performance (KPI). Implementation was straight-forward both with Open Flash Chart and JFreeChart.

Here's how an area chart with more series looks like in OFC:

The same Next chart generated with JFreeChart looks like:

One minor thing you must have in mind if you want to keep your colors unaltered is to paint the series in a Z-order, otherwise the colors will blend. This is not possible every time, so you must allow for color transparency. If there is no transparency, some areas won't be seen, which is not desirable.

See the same chart with blend colors in OFC:

and in JFreeChart:

In this case it is almost impossible to know which legend refers to some area. We must have at least a small portion of the area with the same color as in the legend. The best solution I can think of is to sort descending the areas from that which has the maximum value downwards and that will give as Z-order.

No comments:

Post a comment