Class AbstractChartFactory
- java.lang.Object
-
- org.pentaho.platform.plugin.action.openflashchart.factory.AbstractChartFactory
-
- All Implemented Interfaces:
IChartFactory
- Direct Known Subclasses:
BarChartFactory
,BubbleChartFactory
,DotChartFactory
,LineChartFactory
,PieChartFactory
public abstract class AbstractChartFactory extends Object implements IChartFactory
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractChartFactory.MinMax
-
Field Summary
Fields Modifier and Type Field Description protected Float
alpha
protected static String
AXIS_COLOR_DEFAULT
protected static String
AXIS_GRID_COLOR_DEFAULT
protected String
baseURLTemplate
protected static String
CATEGORY_TYPE
protected ofc4j.model.Chart
chart
protected org.dom4j.Node
chartNode
protected static String
COLOR_NODE_LOC
protected ArrayList<String>
colors
protected static String[]
COLORS_DEFAULT
String[]
columnHeaders
org.pentaho.commons.connection.IPentahoResultSet
data
protected String
datasetType
protected ArrayList<ofc4j.model.elements.Element>
elements
boolean
hasColumnHeaders
boolean
hasRowHeaders
protected static String
HORIZONTAL_ORIENTATION
protected String
orientation
protected static String
ORIENTATION_DEFAULT
protected static String
RANGE_STEPS_NODE_LOC
String[]
rowHeaders
protected String
tooltipText
protected static String
VERTICAL_ORIENTATION
protected static String
XY_TYPE
protected static String
XYZ_TYPE
-
Constructor Summary
Constructors Constructor Description AbstractChartFactory()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String
buildCSSString(String fontfamily, String fontsize, String fontweight, String fontstyle)
protected String
buildCSSStringFromNode(org.dom4j.Node n)
String
convertToJson()
generate ofc jsonprotected abstract void
createElements()
protected String
getColor(int i)
protected int
getColumnCount()
protected String
getColumnHeader(int c)
static String
getNodeValue(org.dom4j.Node parent, String node)
AbstractChartFactory.MinMax
getRangeMinMax()
protected int
getRowCount()
protected String
getRowHeader(int r)
static String
getValue(org.dom4j.Node n)
protected Object
getValueAt(int r, int c)
void
setChartNode(org.dom4j.Node chartNode)
set the xml chart definitionvoid
setData(org.pentaho.commons.connection.IPentahoResultSet data)
set the result set to rendervoid
setLog(org.apache.commons.logging.Log log)
set the loggerprotected void
setupColors()
Setup colors for the series and also backgroundofc4j.model.axis.Axis
setupDomain()
void
setupOnclick()
ofc4j.model.axis.Axis
setupRange()
protected void
setupStyles()
protected void
setupTitles()
void
validateData()
-
-
-
Field Detail
-
COLOR_NODE_LOC
protected static final String COLOR_NODE_LOC
- See Also:
- Constant Field Values
-
RANGE_STEPS_NODE_LOC
protected static final String RANGE_STEPS_NODE_LOC
- See Also:
- Constant Field Values
-
HORIZONTAL_ORIENTATION
protected static final String HORIZONTAL_ORIENTATION
- See Also:
- Constant Field Values
-
VERTICAL_ORIENTATION
protected static final String VERTICAL_ORIENTATION
- See Also:
- Constant Field Values
-
CATEGORY_TYPE
protected static final String CATEGORY_TYPE
- See Also:
- Constant Field Values
-
XY_TYPE
protected static final String XY_TYPE
- See Also:
- Constant Field Values
-
XYZ_TYPE
protected static final String XYZ_TYPE
- See Also:
- Constant Field Values
-
AXIS_GRID_COLOR_DEFAULT
protected static final String AXIS_GRID_COLOR_DEFAULT
- See Also:
- Constant Field Values
-
AXIS_COLOR_DEFAULT
protected static final String AXIS_COLOR_DEFAULT
- See Also:
- Constant Field Values
-
ORIENTATION_DEFAULT
protected static final String ORIENTATION_DEFAULT
- See Also:
- Constant Field Values
-
COLORS_DEFAULT
protected static final String[] COLORS_DEFAULT
-
chart
protected ofc4j.model.Chart chart
-
elements
protected ArrayList<ofc4j.model.elements.Element> elements
-
chartNode
protected org.dom4j.Node chartNode
-
rowHeaders
public String[] rowHeaders
-
columnHeaders
public String[] columnHeaders
-
data
public org.pentaho.commons.connection.IPentahoResultSet data
-
hasRowHeaders
public boolean hasRowHeaders
-
hasColumnHeaders
public boolean hasColumnHeaders
-
datasetType
protected String datasetType
-
orientation
protected String orientation
-
baseURLTemplate
protected String baseURLTemplate
-
tooltipText
protected String tooltipText
-
alpha
protected Float alpha
-
-
Method Detail
-
createElements
protected abstract void createElements()
-
setupStyles
protected void setupStyles()
-
setChartNode
public void setChartNode(org.dom4j.Node chartNode)
Description copied from interface:IChartFactory
set the xml chart definition- Specified by:
setChartNode
in interfaceIChartFactory
- Parameters:
chartNode
- chart definition
-
setLog
public void setLog(org.apache.commons.logging.Log log)
Description copied from interface:IChartFactory
set the logger- Specified by:
setLog
in interfaceIChartFactory
- Parameters:
log
- logger
-
validateData
public void validateData()
-
convertToJson
public String convertToJson()
Description copied from interface:IChartFactory
generate ofc json- Specified by:
convertToJson
in interfaceIChartFactory
- Returns:
- json string
-
setupTitles
protected void setupTitles()
-
setupColors
protected void setupColors()
Setup colors for the series and also background
-
setupDomain
public ofc4j.model.axis.Axis setupDomain()
-
getRangeMinMax
public AbstractChartFactory.MinMax getRangeMinMax()
-
setupRange
public ofc4j.model.axis.Axis setupRange()
-
setupOnclick
public void setupOnclick()
-
setData
public void setData(org.pentaho.commons.connection.IPentahoResultSet data)
Description copied from interface:IChartFactory
set the result set to render- Specified by:
setData
in interfaceIChartFactory
- Parameters:
data
- result set
-
getColumnCount
protected int getColumnCount()
-
getRowCount
protected int getRowCount()
-
getRowHeader
protected String getRowHeader(int r)
-
getColumnHeader
protected String getColumnHeader(int c)
-
getValueAt
protected Object getValueAt(int r, int c)
-
buildCSSStringFromNode
protected String buildCSSStringFromNode(org.dom4j.Node n)
-
buildCSSString
protected String buildCSSString(String fontfamily, String fontsize, String fontweight, String fontstyle)
-
getColor
protected String getColor(int i)
-
getValue
public static String getValue(org.dom4j.Node n)
-
-