org.xwiki.chart
Interface ChartGenerator

All Known Implementing Classes:
DefaultChartGenerator

@ComponentRole
public interface ChartGenerator

A component interface for defining various chart generators.

Since:
2.0M1
Version:
$Id$

Field Summary
static java.lang.String HEIGHT_PARAM
          Height parameter identifier.
static java.lang.String SERIES_PARAM
          Source parameter identifier.
static java.lang.String TITLE_PARAM
          Title parameter identifier.
static java.lang.String TYPE_PARAM
          Type parameter identifier.
static java.lang.String WIDTH_PARAM
          Width parameter identifier.
 
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.
 

Field Detail

TITLE_PARAM

static final java.lang.String TITLE_PARAM
Title parameter identifier.

See Also:
Constant Field Values

HEIGHT_PARAM

static final java.lang.String HEIGHT_PARAM
Height parameter identifier.

See Also:
Constant Field Values

WIDTH_PARAM

static final java.lang.String WIDTH_PARAM
Width parameter identifier.

See Also:
Constant Field Values

TYPE_PARAM

static final java.lang.String TYPE_PARAM
Type parameter identifier.

See Also:
Constant Field Values

SERIES_PARAM

static final java.lang.String SERIES_PARAM
Source parameter identifier.

See Also:
Constant Field Values
Method Detail

generate

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.

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.


Copyright © 2004-2011 XWiki. All Rights Reserved.