public class Chart2 extends Element implements HyperlinkProperties, BorderProperties
To create a new chart use Section.addChart2(ChartStyle, int, int, int, int)
.
To change the chart style use setPlot(ChartPlot)
.
A chart instance contains properties of the chart titles (header, subtitle, footnote), legend and plot properties.
If you want to edit the style specific properties you can get the plot with getPlot()
and cast it to
the plot which belong to this chart style. For more information see the class ChartStyle
.
If you create a new chart all properties except dataset are initialized with default.
To set the dataset properties use ChartPlot.getDataset()
.
For more information see the class BaseDataset
.
For the information how to use the old chart API please see ChartConverter
.
ChartConverter.replaceChart(OldChart)
,
getHeaderTitle()
,
getSubtitle()
,
getFootnote()
,
getLegend()
,
getPlot()
,
Serialized FormModifier and Type | Field and Description |
---|---|
static ChartStyle |
DEFAULT_CHART_STYLE
Default chart style.
|
static java.lang.String |
DEFAULT_FONT_NAME
the default font used by chart.
|
static ChartTitle |
DEFAULT_FOOTNOTE_TITLE
the default font and color properties of footnote title of chart.
|
static ChartTitle |
DEFAULT_HEADER_TITLE
The default font and color properties of header title of chart.
|
static ChartTitle |
DEFAULT_SUBTITLE_TITLE
the default font and color properties of subtitle title of chart.
|
static java.lang.String |
PLOT_ORIENTATION_HORIZONTAL
A constant for the horizontal orientation of chart.
|
static java.lang.String |
PLOT_ORIENTATION_VERTICAL
A constant for the vertical orientation of chart.
|
BOX, CHART, CROSSTAB, CROSSTABSECTION, DATABASE_PICTURE, FIELD, FIELDPART, FORMFIELD, INTERACTIVE_SORTING, JAVABEAN, LINE, PARAGRAPH, PICTURE, SIGNATURE, SUBREPORT, TEXT, TEXTPART
LINE_STYLE_DASHED, LINE_STYLE_DOTTED, LINE_STYLE_DOUBLE, LINE_STYLE_SINGLE, NO_LINE
ALIGN_HORIZONTAL_CENTER, ALIGN_HORIZONTAL_DEFAULT, ALIGN_HORIZONTAL_JUSTIFIED, ALIGN_HORIZONTAL_LEFT, ALIGN_HORIZONTAL_RIGHT
Modifier and Type | Method and Description |
---|---|
ChartTitle |
getFootnote()
Returns the footnote of this chart.
|
ChartTitle |
getHeaderTitle()
Returns the header title of this chart.
|
Legend |
getLegend()
Returns the legend of this chart.
|
java.util.ResourceBundle |
getLocalizationResources()
Returns a localized resources bundle for the chart messages.
|
ChartPlot |
getPlot()
Returns the plot of chart.
|
java.lang.String |
getPlotOrientation()
Returns the plot orientation of this chart.
|
java.util.List<? extends ReportComponent> |
getSubComponents()
Returns all
ReportComponent s that are descendants of this one. |
ChartTitle |
getSubtitle()
Returns the sub title of this chart.
|
void |
refreshAutoTitles()
Reads out the data column names from dataset and refreshes the chart labels.
|
void |
setFootnote(ChartTitle footnote)
Sets the footnote of this chart.
|
void |
setHeaderTitle(ChartTitle headerTitle)
Sets the header title of this chart.
|
void |
setLegend(Legend legend)
Sets the legend of this chart.
|
void |
setPlot(ChartPlot plot)
Sets a new plot for this chart.
|
void |
setPlotOrientation(java.lang.String plotOrientation)
Sets the plot orientation of this chart.
|
void |
setSubtitle(ChartTitle subtitle)
Sets the sub title of this chart.
|
addListener, copy, getBottomLineStyle, getBottomLineStyleFormula, getCanGrowCount, getCanGrowFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getEngine, getField, getForeColor, getForeColorFormula, getHorAlign, getHorAlignFormula, getHyperlinkUrl, getHyperlinkUrlFormula, getLeftLineStyle, getLeftLineStyleFormula, getParent, getPropertyFormulas, getRightLineStyle, getRightLineStyleFormula, getSuppressIfDuplicatedFormula, getTightHorizontalFormula, getToolTipsText, getToolTipsTextFormula, getTopLineStyle, getTopLineStyleFormula, indexOf, isCanGrow, isCloseBorderOnPageBreak, isDropShadow, isSuppressIfDuplicated, isTightHorizontal, paramString, removeListener, setBottomLineStyle, setBottomLineStyleFormula, setCanGrow, setCanGrowCount, setCanGrowFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setField, setForeColor, setForeColorFormula, setHorAlign, setHorAlignFormula, setHyperlinkUrl, setHyperlinkUrlFormula, setIndex, setLeftLineStyle, setLeftLineStyleFormula, setRightLineStyle, setRightLineStyleFormula, setSuppressIfDuplicated, setSuppressIfDuplicatedFormula, setTightHorizontal, setTightHorizontalFormula, setToolTipsText, setToolTipsTextFormula, setTopLineStyle, setTopLineStyleFormula
getBackColor, getBackColorFormula, getHeight, getKeepTogetherFormula, getSuppressFormula, getType, getWidth, getX, getY, isKeepTogether, isSuppress, setBackColor, setBackColorFormula, setHeight, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula, setWidth, setX, setY
getHyperlinkUrl, getHyperlinkUrlFormula, setHyperlinkUrl, setHyperlinkUrlFormula
getBackColor, getBackColorFormula, getBottomLineStyle, getBottomLineStyleFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getForeColor, getForeColorFormula, getLeftLineStyle, getLeftLineStyleFormula, getRightLineStyle, getRightLineStyleFormula, getTightHorizontalFormula, getTopLineStyle, getTopLineStyleFormula, isCloseBorderOnPageBreak, isDropShadow, isTightHorizontal, setBackColor, setBackColorFormula, setBottomLineStyle, setBottomLineStyleFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setForeColor, setForeColorFormula, setLeftLineStyle, setLeftLineStyleFormula, setRightLineStyle, setRightLineStyleFormula, setTightHorizontal, setTightHorizontalFormula, setTopLineStyle, setTopLineStyleFormula
getKeepTogetherFormula, getSuppressFormula, isKeepTogether, isSuppress, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula
isDOMParser, parseDOM, parseElement, parseEndElement, parseText
public static final ChartStyle DEFAULT_CHART_STYLE
public static final java.lang.String DEFAULT_FONT_NAME
public static final ChartTitle DEFAULT_HEADER_TITLE
public static final ChartTitle DEFAULT_SUBTITLE_TITLE
public static final ChartTitle DEFAULT_FOOTNOTE_TITLE
public static final java.lang.String PLOT_ORIENTATION_VERTICAL
public static final java.lang.String PLOT_ORIENTATION_HORIZONTAL
public java.lang.String getPlotOrientation()
setPlotOrientation(String)
,
PLOT_ORIENTATION_HORIZONTAL
,
PLOT_ORIENTATION_VERTICAL
public void setPlotOrientation(java.lang.String plotOrientation)
plotOrientation
- the plot orientation name (null
not permitted).java.lang.IllegalArgumentException
- by null
or unknown plot orientation.getPlotOrientation()
,
PLOT_ORIENTATION_HORIZONTAL
,
PLOT_ORIENTATION_VERTICAL
public ChartTitle getHeaderTitle()
setHeaderTitle(ChartTitle)
,
ChartTitle
public void setHeaderTitle(ChartTitle headerTitle)
headerTitle
- the title (null
not permitted).getHeaderTitle()
,
ChartTitle
public ChartTitle getSubtitle()
setSubtitle(com.inet.report.chart.ChartTitle)
,
ChartTitle
public void setSubtitle(ChartTitle subtitle)
subtitle
- the title (null
not permitted).getSubtitle()
,
ChartTitle
public ChartTitle getFootnote()
setFootnote(com.inet.report.chart.ChartTitle)
,
ChartTitle
public void setFootnote(ChartTitle footnote)
footnote
- the title (null
not permitted).getFootnote()
,
ChartTitle
public ChartPlot getPlot()
AbstractPlot
or a CombinedPlot
with a list of simple plots.
A plot of type AbstractPlot
you can cast to a plot appropriate to chart style.
See the implementations of interface ChartStyle
.setPlot(com.inet.report.chart.plot.ChartPlot)
,
AbstractPlot
,
BarPlot
,
LinePlot
,
AreaPlot
,
Chart3DPlot
,
PolarPlot
,
GanttPlot
,
PiePlot
,
StockPlot
,
XYPlot
,
ContinuousBarPlot
,
ContinuousLinePlot
,
ContinuousAreaPlot
public void setPlot(ChartPlot plot)
AbstractPlot
or a CombinedPlot
with a list of simple plots.LineStyle.LINE_MARKER_STACKED
to get a stacked line style,
use LineStyle.getDefaultPlot()
to get a new line plot and set it with this function.plot
- the plot (null
not permitted).getPlot()
,
ChartStyle.getDefaultPlot()
,
ChartPlot
,
AbstractPlot
,
CombinedPlot
public Legend getLegend()
setLegend(Legend)
public void setLegend(Legend legend)
Legend.setLegendPlacement(com.inet.report.chart.LegendPlacement)
with parameter LegendPlacement.NONE
.legend
- the legend (null
not permitted).getLegend()
public void refreshAutoTitles()
public java.util.ResourceBundle getLocalizationResources()
Engine.setLocale(java.util.Locale)
,
Engine.setClientLocale(java.util.Locale)
public java.util.List<? extends ReportComponent> getSubComponents()
ReportComponent
s that are descendants of this one. E.G. this will return all Element
of a Section
. But it's as well useful for CrossTab
s or Text
elements which have
additional elements.getSubComponents
in class ReportComponent
null
if the component has no descendantsCopyright © 1999-2020 by i-net software GmbH