Package net.sf.jasperreports.engine
Interface JRChart
-
- All Superinterfaces:
java.lang.Cloneable,JRAnchor,JRBoxContainer,JRChild,JRCloneable,JRCommonElement,JRElement,JREvaluation,JRHyperlink,JRIdentifiable,JRPropertiesHolder,JRStyleContainer,JRVisitable
- All Known Implementing Classes:
JRBaseChart,JRDesignChart,JRFillChart
public interface JRChart extends JRElement, JREvaluation, JRAnchor, JRHyperlink, JRBoxContainer
Implementations of this interface can be used for rendering chart components. Data obtained from the report datasource can be also displayed in a chart, embedded in the report. There are a lot of chart types, each with its own dataset and characteristics. This interface only defines the common properties.- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static byteCHART_TYPE_AREAstatic byteCHART_TYPE_BARstatic byteCHART_TYPE_BAR3Dstatic byteCHART_TYPE_BUBBLEstatic byteCHART_TYPE_CANDLESTICKstatic byteCHART_TYPE_GANTTstatic byteCHART_TYPE_HIGHLOWstatic byteCHART_TYPE_LINEstatic byteCHART_TYPE_METERstatic byteCHART_TYPE_MULTI_AXISstatic byteCHART_TYPE_PIEstatic byteCHART_TYPE_PIE3Dstatic byteCHART_TYPE_SCATTERstatic byteCHART_TYPE_STACKEDAREAstatic byteCHART_TYPE_STACKEDBARstatic byteCHART_TYPE_STACKEDBAR3Dstatic byteCHART_TYPE_THERMOMETERstatic byteCHART_TYPE_TIMESERIESstatic byteCHART_TYPE_XYAREAstatic byteCHART_TYPE_XYBARstatic byteCHART_TYPE_XYLINEstatic java.lang.StringPROPERTY_CHART_RENDER_TYPESpecifies the type of chart rendering.static java.lang.StringPROPERTY_CHART_THEMEProperty used to specify the chart theme name.static java.lang.StringRENDER_TYPE_DRAWrendering typestatic java.lang.StringRENDER_TYPE_IMAGEstatic java.lang.StringRENDER_TYPE_SVG-
Fields inherited from interface net.sf.jasperreports.engine.JRAnchor
NO_BOOKMARK
-
Fields inherited from interface net.sf.jasperreports.engine.JRElement
PROPERTY_ELEMENT_TEMPLATE_POPULATE_STYLE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description bytegetChartType()Gets the chart type.java.lang.StringgetCustomizerClass()Gets a user specified chart customizer class name.JRChartDatasetgetDataset()Gets the chart dataset.java.awt.ColorgetLegendBackgroundColor()java.awt.ColorgetLegendColor()JRFontgetLegendFont()EdgeEnumgetLegendPositionValue()java.awt.ColorgetOwnLegendBackgroundColor()java.awt.ColorgetOwnLegendColor()java.awt.ColorgetOwnSubtitleColor()java.awt.ColorgetOwnTitleColor()JRChartPlotgetPlot()Gets the chart plot.java.lang.StringgetRenderType()java.lang.BooleangetShowLegend()java.awt.ColorgetSubtitleColor()JRExpressiongetSubtitleExpression()Gets the expression whose evaluation will form the subtitle.JRFontgetSubtitleFont()java.lang.StringgetTheme()java.awt.ColorgetTitleColor()JRExpressiongetTitleExpression()Gets the expression whose evaluation will form the title.JRFontgetTitleFont()EdgeEnumgetTitlePositionValue()Gets the title position relative to the chart.voidsetLegendBackgroundColor(java.awt.Color legendBackgroundColor)voidsetLegendColor(java.awt.Color legendColor)voidsetLegendPosition(EdgeEnum legendPosition)voidsetRenderType(java.lang.String renderType)voidsetShowLegend(java.lang.Boolean isShowLegend)voidsetSubtitleColor(java.awt.Color subtitleColor)voidsetTheme(java.lang.String theme)voidsetTitleColor(java.awt.Color titleColor)voidsetTitlePosition(EdgeEnum titlePosition)Sets the title position relative to the chart.-
Methods inherited from interface net.sf.jasperreports.engine.JRAnchor
getAnchorNameExpression, getBookmarkLevel, getBookmarkLevelExpression
-
Methods inherited from interface net.sf.jasperreports.engine.JRBoxContainer
getDefaultLineColor, getLineBox
-
Methods inherited from interface net.sf.jasperreports.engine.JRCloneable
clone
-
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getHeight, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getWidth, setBackcolor, setForecolor, setMode
-
Methods inherited from interface net.sf.jasperreports.engine.JRElement
clone, collectExpressions, getElementGroup, getKey, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchTypeValue, getStyleExpression, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
-
Methods inherited from interface net.sf.jasperreports.engine.JREvaluation
getEvaluationGroup, getEvaluationTimeValue
-
Methods inherited from interface net.sf.jasperreports.engine.JRHyperlink
getHyperlinkAnchorExpression, getHyperlinkPageExpression, getHyperlinkParameters, getHyperlinkReferenceExpression, getHyperlinkTarget, getHyperlinkTargetValue, getHyperlinkTooltipExpression, getHyperlinkTypeValue, getHyperlinkWhenExpression, getLinkTarget, getLinkType
-
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
-
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
-
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleNameReference
-
Methods inherited from interface net.sf.jasperreports.engine.JRVisitable
visit
-
-
-
-
Field Detail
-
PROPERTY_CHART_RENDER_TYPE
static final java.lang.String PROPERTY_CHART_RENDER_TYPE
Specifies the type of chart rendering. Possible values aredraw,imageandsvg. If the rendering type isdrawa vector image is constructed, using theJFreeChartdedicated APIs. For type image, a PNG encoded image will be generated, while for type svg, an SVG snippet will be generated.Defaults to
draw.- See Also:
- Constant Field Values
-
PROPERTY_CHART_THEME
static final java.lang.String PROPERTY_CHART_THEME
Property used to specify the chart theme name.- See Also:
- Constant Field Values
-
CHART_TYPE_AREA
static final byte CHART_TYPE_AREA
- See Also:
- Constant Field Values
-
CHART_TYPE_BAR3D
static final byte CHART_TYPE_BAR3D
- See Also:
- Constant Field Values
-
CHART_TYPE_BAR
static final byte CHART_TYPE_BAR
- See Also:
- Constant Field Values
-
CHART_TYPE_BUBBLE
static final byte CHART_TYPE_BUBBLE
- See Also:
- Constant Field Values
-
CHART_TYPE_CANDLESTICK
static final byte CHART_TYPE_CANDLESTICK
- See Also:
- Constant Field Values
-
CHART_TYPE_HIGHLOW
static final byte CHART_TYPE_HIGHLOW
- See Also:
- Constant Field Values
-
CHART_TYPE_LINE
static final byte CHART_TYPE_LINE
- See Also:
- Constant Field Values
-
CHART_TYPE_PIE3D
static final byte CHART_TYPE_PIE3D
- See Also:
- Constant Field Values
-
CHART_TYPE_PIE
static final byte CHART_TYPE_PIE
- See Also:
- Constant Field Values
-
CHART_TYPE_SCATTER
static final byte CHART_TYPE_SCATTER
- See Also:
- Constant Field Values
-
CHART_TYPE_STACKEDBAR3D
static final byte CHART_TYPE_STACKEDBAR3D
- See Also:
- Constant Field Values
-
CHART_TYPE_STACKEDBAR
static final byte CHART_TYPE_STACKEDBAR
- See Also:
- Constant Field Values
-
CHART_TYPE_XYAREA
static final byte CHART_TYPE_XYAREA
- See Also:
- Constant Field Values
-
CHART_TYPE_XYBAR
static final byte CHART_TYPE_XYBAR
- See Also:
- Constant Field Values
-
CHART_TYPE_XYLINE
static final byte CHART_TYPE_XYLINE
- See Also:
- Constant Field Values
-
CHART_TYPE_TIMESERIES
static final byte CHART_TYPE_TIMESERIES
- See Also:
- Constant Field Values
-
CHART_TYPE_METER
static final byte CHART_TYPE_METER
- See Also:
- Constant Field Values
-
CHART_TYPE_THERMOMETER
static final byte CHART_TYPE_THERMOMETER
- See Also:
- Constant Field Values
-
CHART_TYPE_MULTI_AXIS
static final byte CHART_TYPE_MULTI_AXIS
- See Also:
- Constant Field Values
-
CHART_TYPE_STACKEDAREA
static final byte CHART_TYPE_STACKEDAREA
- See Also:
- Constant Field Values
-
CHART_TYPE_GANTT
static final byte CHART_TYPE_GANTT
- See Also:
- Constant Field Values
-
RENDER_TYPE_DRAW
static final java.lang.String RENDER_TYPE_DRAW
rendering type- See Also:
- Constant Field Values
-
RENDER_TYPE_IMAGE
static final java.lang.String RENDER_TYPE_IMAGE
- See Also:
- Constant Field Values
-
RENDER_TYPE_SVG
static final java.lang.String RENDER_TYPE_SVG
- See Also:
- Constant Field Values
-
-
Method Detail
-
getShowLegend
java.lang.Boolean getShowLegend()
-
setShowLegend
void setShowLegend(java.lang.Boolean isShowLegend)
-
getTitleExpression
JRExpression getTitleExpression()
Gets the expression whose evaluation will form the title.
-
getTitleFont
JRFont getTitleFont()
-
getTitlePositionValue
EdgeEnum getTitlePositionValue()
Gets the title position relative to the chart.
-
setTitlePosition
void setTitlePosition(EdgeEnum titlePosition)
Sets the title position relative to the chart.
-
getTitleColor
java.awt.Color getTitleColor()
-
getOwnTitleColor
java.awt.Color getOwnTitleColor()
-
setTitleColor
void setTitleColor(java.awt.Color titleColor)
-
getSubtitleExpression
JRExpression getSubtitleExpression()
Gets the expression whose evaluation will form the subtitle.
-
getSubtitleFont
JRFont getSubtitleFont()
-
getSubtitleColor
java.awt.Color getSubtitleColor()
-
getOwnSubtitleColor
java.awt.Color getOwnSubtitleColor()
-
setSubtitleColor
void setSubtitleColor(java.awt.Color subtitleColor)
-
getLegendColor
java.awt.Color getLegendColor()
-
getOwnLegendColor
java.awt.Color getOwnLegendColor()
-
setLegendColor
void setLegendColor(java.awt.Color legendColor)
-
getOwnLegendBackgroundColor
java.awt.Color getOwnLegendBackgroundColor()
-
getLegendBackgroundColor
java.awt.Color getLegendBackgroundColor()
-
setLegendBackgroundColor
void setLegendBackgroundColor(java.awt.Color legendBackgroundColor)
-
getLegendFont
JRFont getLegendFont()
-
getLegendPositionValue
EdgeEnum getLegendPositionValue()
-
setLegendPosition
void setLegendPosition(EdgeEnum legendPosition)
-
getDataset
JRChartDataset getDataset()
Gets the chart dataset. Most chart types have different dataset structures, depending on the chart type.
-
getPlot
JRChartPlot getPlot()
Gets the chart plot. Plots are used to define various chart visual properties, such as colors and transparency.
-
getChartType
byte getChartType()
Gets the chart type. It must be one of the chart type constants in this class.
-
getCustomizerClass
java.lang.String getCustomizerClass()
Gets a user specified chart customizer class name.- See Also:
JRChartCustomizer
-
getRenderType
java.lang.String getRenderType()
-
setRenderType
void setRenderType(java.lang.String renderType)
-
getTheme
java.lang.String getTheme()
-
setTheme
void setTheme(java.lang.String theme)
-
-