de.laures.cewolf.cpp
Class PieEnhancer
java.lang.Object
de.laures.cewolf.cpp.PieEnhancer
- All Implemented Interfaces:
- ChartPostProcessor, java.io.Serializable
public class PieEnhancer
- extends java.lang.Object
- implements ChartPostProcessor, java.io.Serializable
A postprocessor for changing details of a Pie plot.
interiorGap gap between plot and exterior boundary; default is 0.05, which means 5%
labelGap gap between the edge of the pie and the labels, expressed as a percentage of the plot width.
startAngle angle at which to start drawing; default is 0
showSectionLabels whether or not to show labels for the pie sections; default is true.
In lieu of labels it's possible to use a legend.
showShadow whether or not to show a drop shadow for the chart; defaults is true.
simpleLabels whether or not to use simple labels on the pie sections; default is false, which means
to move the labels away from the chart, and to draw a line to the associated pie section
explode_ breaks a particular section of the pie out of it; the distance it is moved out is appended
to the "explode_" as a percentage, e.g. "explode_0.25"; the value being passed is the name of the section.
More than one section can be broken out, but since there can be no two parameters with the same name,
slightly different percentages must be used; see the usage example below. Note that 3D pie charts do not support
exploded sections.
Usage:
<chart:chartpostprocessor id="pieEnhancer">
<chart:param name="interiorGap" value="0.25" />
<chart:param name="labelGap" value="0.05" />
<chart:param name="startAngle" value="30" />
<chart:param name="showSectionLabels" value="true"/>
<chart:param name="showShadow" value="false"/>
<chart:param name="simpleLabels" value="true" />
<chart:param name="explode_0.25" value="apples" />
<chart:param name="explode_0.26" value="bananas" />
</chart:chartpostprocessor>
- See Also:
- Serialized Form
Method Summary |
void |
processChart(org.jfree.chart.JFreeChart chart,
java.util.Map<java.lang.String,java.lang.String> params)
Processes a generated chart. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PieEnhancer
public PieEnhancer()
processChart
public void processChart(org.jfree.chart.JFreeChart chart,
java.util.Map<java.lang.String,java.lang.String> params)
- Description copied from interface:
ChartPostProcessor
- Processes a generated chart. This method is called by the ChartProducer
after a chart instance is generated and before it is rendered (if so).
The ChartProducer is responsible for post processing a chart dependant
on and only on the provided parameters. This means that the same parameters
should result in the same postprocessings.
- Specified by:
processChart
in interface ChartPostProcessor
- Parameters:
chart
- the chart instanceparams
- parameters passed to the postprocessor. These are defined in the JSP- See Also:
ChartPostProcessorTag
cewolf tag library - web charts with JFreeChart