The googlechart component provides basic charting capabilities. It currently supports a single chart type; to render a collection as a pie chart:
All that is required is for the object to implement the (horribly
named) PieChartable
:
package org.starobjects.wicket.view.googlecharts.applib; public interface PieChartable { double getPieChartValue(); String getPieChartLabel(); }
The label is used to point to each sector on the pie chart, the value determines the size of each sector relative to the other sectors.