Package com.inet.report.chart.plot
Class ContinuousBarPlot
- java.lang.Object
-
- com.inet.report.chart.plot.AbstractPlot
-
- com.inet.report.chart.plot.StandardPlot
-
- com.inet.report.chart.plot.ContinuousBarPlot
-
- All Implemented Interfaces:
ChartPlot
,java.io.Serializable
public class ContinuousBarPlot extends StandardPlot
A general class for plotting data of groups of values. This plot can use data from any class that implements theBaseDataset
interface.- Since:
- 8.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.inet.report.chart.plot.AbstractPlot
AbstractPlot.GradientSetting
-
-
Field Summary
Fields Modifier and Type Field Description static ContinuousBarStyle
DEFAULT_BAR_STYLE
Default chart style with this plot.-
Fields inherited from class com.inet.report.chart.plot.StandardPlot
ITEM_LABEL_POSITION_BASE, ITEM_LABEL_POSITION_CENTER, ITEM_LABEL_POSITION_INSIDE_OF_MAX, ITEM_LABEL_POSITION_OUTSIDE_OF_MAX
-
Fields inherited from class com.inet.report.chart.plot.AbstractPlot
DEFAULT_COLOR_SEQUENCE, DEFAULT_FOREGROUND_ALPHA, DEFAULT_ITEM_LABEL_COLOR, DEFAULT_ITEM_LABEL_FONT, DEFAULT_OUTLINE_COLOR, DEFAULT_OUTLINE_STYLE, DEFAULT_OUTLINE_WIDTH, TOKEN_PLOT
-
-
Constructor Summary
Constructors Constructor Description ContinuousBarPlot()
Creates a continuous bar plot with default properties.ContinuousBarPlot(ContinuousBarStyle style)
Creates a continuous bar plot with defined chart style.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChartStyle
getStyle()
Returns the style of this chart, ie. the general category this plot belongs to.protected java.lang.StringBuilder
getSubProperties(int depth)
Returns the serialized simple properties of subclasses.boolean
isOverlapping()
In a ContinuousBarChart, by default, the individual values of different series for each category value are drawn overlapping each other, so that small bars can be covered by larger bars.void
readProperties(org.w3c.dom.Element element, Chart2 chart)
Reads the chart properties from the DOMParser Element.void
setCategoryAxis(com.inet.report.chart.axis.ContinuousAxis categoryAxis)
Sets a category axis.void
setDataAxis(ContinuousNumberAxis dataAxis)
Sets a data axis of this plot.void
setOverlapping(boolean isOverlapping)
In a ContinuousBarChart, by default, the individual values of different series for each category value are drawn overlapping each other, so that small bars can be covered by larger bars.void
setStyle(ContinuousBarStyle style)
Sets the chart style of this plot.-
Methods inherited from class com.inet.report.chart.plot.StandardPlot
getCategoryAxis, getDataAxis, getDataset, getItemLabelPosition, getReferencedObject, isShowCumulativeValues, refreshAutoTitles, saveSubProperties, setCategoryAxis, setDataAxis, setDataset, setItemLabelPosition, setShowCumulativeValues
-
Methods inherited from class com.inet.report.chart.plot.AbstractPlot
getBackColor, getColorFormula, getColorSequence, getForegroundAlpha, getGradientSetting, getItemLabelColor, getItemLabelFont, getItemLabelFormat, getItemLabelFormatFormula, getItemShape, getOutlineColor, getOutlineStyle, getOutlineWidth, isColorBySeries, isDrawOutline, isSameColorsForSameGroups, isShowLabel, isShowValue, saveProperties, setBackColor, setColorBySeries, setColorFormula, setColorSequence, setDrawOutline, setForegroundAlpha, setGradientSetting, setItemLabelColor, setItemLabelFont, setItemLabelFormat, setItemLabelFormatFormula, setItemShape, setOutlineColor, setOutlineStyle, setOutlineWidth, setSameColorsForSameGroups, setShowLabel, setShowValue
-
-
-
-
Field Detail
-
DEFAULT_BAR_STYLE
public static final ContinuousBarStyle DEFAULT_BAR_STYLE
Default chart style with this plot.
-
-
Constructor Detail
-
ContinuousBarPlot
public ContinuousBarPlot()
Creates a continuous bar plot with default properties.- Since:
- 8.0
-
ContinuousBarPlot
public ContinuousBarPlot(ContinuousBarStyle style)
Creates a continuous bar plot with defined chart style. Initializes all properties with default values.- Parameters:
style
- the chart style (null
not permitted)- Since:
- 8.0
- See Also:
ContinuousBarStyle
-
-
Method Detail
-
setCategoryAxis
public void setCategoryAxis(com.inet.report.chart.axis.ContinuousAxis categoryAxis)
Sets a category axis. Note: the date chart style supports only aContinuousDateAxis
, the number style supports onlyContinuousNumberAxis
.- Parameters:
categoryAxis
- the category axis (null
not permitted)- Throws:
java.lang.IllegalArgumentException
- if the axis isnull
or from not supported type.- Since:
- 8.0
- See Also:
StandardPlot.getCategoryAxis()
,ContinuousBarStyle.BAR_DATE
,ContinuousBarStyle.BAR_NUMBER
-
setDataAxis
public void setDataAxis(ContinuousNumberAxis dataAxis)
Sets a data axis of this plot. The data axis shows the summarized values of the data fields.- Parameters:
dataAxis
- the data axis (null
not permitted)- Throws:
java.lang.IllegalArgumentException
- if the axis isnull
.- Since:
- 8.0
- See Also:
StandardPlot.getDataAxis()
,ContinuousNumberAxis
-
getStyle
public ChartStyle getStyle()
Returns the style of this chart, ie. the general category this plot belongs to.- Specified by:
getStyle
in classStandardPlot
- Returns:
- the style
- See Also:
BarStyle.BAR2D
,LineStyle.LINE_MARKER
,AreaStyle.AREA2D_STACKED
-
setStyle
public void setStyle(ContinuousBarStyle style)
Sets the chart style of this plot. Note: if you change the chart style from date to number all number are lost.- Parameters:
style
- the chart style (null
not permitted)- Since:
- 8.0
- See Also:
getStyle()
,ContinuousBarStyle.BAR_DATE
,ContinuousBarStyle.BAR_NUMBER
,ContinuousBarStyle.BAR_STACKED_NUMBER
,ContinuousBarStyle.BAR_STACKED_DATE
-
isOverlapping
public boolean isOverlapping()
In a ContinuousBarChart, by default, the individual values of different series for each category value are drawn overlapping each other, so that small bars can be covered by larger bars. With the normal BarChart, the bars of the individual values of the series are displayed next to each other. Returns if bars from different series are painted over each other and not beside each other- Returns:
- true if the bars are overlapping each other
- Since:
- 23.4
-
setOverlapping
public void setOverlapping(boolean isOverlapping)
In a ContinuousBarChart, by default, the individual values of different series for each category value are drawn overlapping each other, so that small bars can be covered by larger bars. With the normal BarChart, the bars of the individual values of the series are displayed next to each other. With this setting, the behavior of the ContinousBarChart can be adapted to the behavior of the normal BarCharts.- Parameters:
isOverlapping
- true if the bars should be overlapping other bars- Since:
- 23.4
-
readProperties
public void readProperties(org.w3c.dom.Element element, Chart2 chart)
Reads the chart properties from the DOMParser Element.- Specified by:
readProperties
in interfaceChartPlot
- Overrides:
readProperties
in classStandardPlot
- Parameters:
element
- the DOMParser Elementchart
- the chart
-
getSubProperties
protected java.lang.StringBuilder getSubProperties(int depth)
Returns the serialized simple properties of subclasses.- Overrides:
getSubProperties
in classStandardPlot
- Parameters:
depth
- the depth of XML indent- Returns:
- the properties.
-
-