org.xwiki.chart.internal
Class DefaultChartGenerator
java.lang.Object
org.xwiki.chart.internal.DefaultChartGenerator
- All Implemented Interfaces:
- ChartGenerator, org.xwiki.component.phase.Initializable
@Component
public class DefaultChartGenerator
- extends java.lang.Object
- implements ChartGenerator, org.xwiki.component.phase.Initializable
The default implementation of ChartGenerator component interface which utilizes the jfreechart charting
library.
- Since:
- 2.0M1
- Version:
- $Id$
|
Method Summary |
byte[] |
generate(ChartModel model,
java.util.Map<java.lang.String,java.lang.String> parameters)
Generates an image of a chart representing the data presented as a ChartModel and extra formatting
parameters provided in the parameters map. |
void |
initialize()
|
void |
setDefaultParams(java.util.Map<java.lang.String,java.lang.String> parameters)
Sets up default values for certain parameters, if they are not provided. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultChartGenerator
public DefaultChartGenerator()
initialize
public void initialize()
throws org.xwiki.component.phase.InitializationException
-
- Specified by:
initialize in interface org.xwiki.component.phase.Initializable
- Throws:
org.xwiki.component.phase.InitializationException
generate
public byte[] generate(ChartModel model,
java.util.Map<java.lang.String,java.lang.String> parameters)
throws ChartGeneratorException
- Generates an image of a chart representing the data presented as a
ChartModel and extra formatting
parameters provided in the parameters map.
- Specified by:
generate in interface ChartGenerator
- Parameters:
model - the ChartModel which defines the data model to be represented by the chart.parameters - extra parameters for controlling various features of the image output.
- Returns:
- the chart image (binary).
- Throws:
ChartGeneratorException - if the ChartGenerator is unable to render a chart.
setDefaultParams
public void setDefaultParams(java.util.Map<java.lang.String,java.lang.String> parameters)
- Sets up default values for certain parameters, if they are not provided.
- Parameters:
parameters - the parameter set which the values are to be put into
Copyright © 2004-2011 XWiki. All Rights Reserved.