org.pentaho.chart.model
Class ChartModel

java.lang.Object
  extended by org.pentaho.chart.model.ChartModel
All Implemented Interfaces:
Serializable

public class ChartModel
extends Object
implements Serializable

The documentation for this class is from the perspective of the ChartModel file. The valid property parameters may not match the property parameter type, but instead reflects the values that may be present in the file. Properties which are classes have their own configurable properties and are therefore linked. Please reference the respective class for its attributes.

See Also:
Serialized Form

Field Summary
static String DEFAULT_FAMILY
           
static int DEFAULT_SIZE
           
 
Constructor Summary
ChartModel()
           
 
Method Summary
 Object getBackground()
          Get the currently set background
 Integer getBorderColor()
           
 boolean getBorderVisible()
           
 Integer getBorderWidth()
           
 String getChartEngineId()
           
 ChartLegend getLegend()
           
 Plot getPlot()
           
 CssStyle getStyle()
           
 StyledText getSubtitle()
           
 List<StyledText> getSubtitles()
           
 Theme.ChartTheme getTheme()
           
 ChartTitle getTitle()
           
 void setBackground(Gradient backgroundGradient)
          Not implemented
 void setBackground(Integer backgroundColor)
          StyledText.setBackgroundColor(Integer)
 void setBackground(String backgroundImageLocation)
          Not implemented
 void setBackground(Texture backgroundTexture)
          Not implemented
 void setBorderColor(Integer color)
          Hex RGB notation of the desired border color
 void setBorderVisible(boolean visible)
          Not implemented
 void setBorderWidth(Integer width)
          Width of the entire chart area in pixels
 void setChartEngineId(String id)
          Desired renderer of the chart.
 void setLegend(ChartLegend chartLegend)
           
 void setPlot(Plot plot)
          The plot is the area on which the chart will be rendered.
 void setSubtitle(StyledText title)
           
 void setSubtitles(List<StyledText> subtitles)
           
 void setTheme(Theme.ChartTheme theme)
          Set an overall color and style scheme for the chart.
 void setTitle(ChartTitle title)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FAMILY

public static final String DEFAULT_FAMILY
See Also:
Constant Field Values

DEFAULT_SIZE

public static final int DEFAULT_SIZE
See Also:
Constant Field Values
Constructor Detail

ChartModel

public ChartModel()
Method Detail

getChartEngineId

public String getChartEngineId()

setChartEngineId

public void setChartEngineId(String id)
Desired renderer of the chart.

Possible values
JFreeChart
OpenFlashChart

Parameters:
id -

getTheme

public Theme.ChartTheme getTheme()

setTheme

public void setTheme(Theme.ChartTheme theme)
Set an overall color and style scheme for the chart.

Possible values
THEME1
THEME2
THEME3
THEME4
THEME5
THEME6

Parameters:
theme -

getSubtitles

public List<StyledText> getSubtitles()

setSubtitles

public void setSubtitles(List<StyledText> subtitles)
Parameters:
subtitles -
See Also:
StyledText

getSubtitle

public StyledText getSubtitle()

setSubtitle

public void setSubtitle(StyledText title)
Parameters:
title -
See Also:
StyledText

getLegend

public ChartLegend getLegend()

setLegend

public void setLegend(ChartLegend chartLegend)
Parameters:
chartLegend -
See Also:
ChartLegend

getBackground

public Object getBackground()
Get the currently set background

Returns:
The currently set background

setBackground

public void setBackground(Integer backgroundColor)
StyledText.setBackgroundColor(Integer)

Parameters:
backgroundColor -

setBackground

public void setBackground(String backgroundImageLocation)
Not implemented

Parameters:
backgroundImageLocation -

setBackground

public void setBackground(Gradient backgroundGradient)
Not implemented

Parameters:
backgroundGradient -
See Also:
Gradient

setBackground

public void setBackground(Texture backgroundTexture)
Not implemented

Parameters:
backgroundTexture -

getPlot

public Plot getPlot()
Returns:
Instance of plot implementation

setPlot

public void setPlot(Plot plot)
The plot is the area on which the chart will be rendered.

Possible values
barPlot
areaPlot
linePlot
piePlot
dialPlot

Parameters:
plot -

getTitle

public ChartTitle getTitle()

setTitle

public void setTitle(ChartTitle title)
Parameters:
title -
See Also:
ChartTitle

getBorderColor

public Integer getBorderColor()

getBorderVisible

public boolean getBorderVisible()

getBorderWidth

public Integer getBorderWidth()

setBorderColor

public void setBorderColor(Integer color)
Hex RGB notation of the desired border color

Basic colors
White: #FFFFFF
Black: #000000
Grey: #888888
Red: #FF0000
Green: #00FF00
Blue: #0000FF

Parameters:
color -

setBorderVisible

public void setBorderVisible(boolean visible)
Not implemented

Parameters:
visible -

setBorderWidth

public void setBorderWidth(Integer width)
Width of the entire chart area in pixels

Parameters:
width -

getStyle

public CssStyle getStyle()