public class BarPlot extends StandardPlot
BaseDataset
interface.AbstractPlot.GradientSetting
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_BAR_MARGIN_PERCENT
The default bar margin percentage.
|
static double |
DEFAULT_BAR_WIDTH
The default bar width.
|
static BarStyle |
DEFAULT_STYLE
Default chart style with this plot.
|
static int |
ITEM_LABEL_ALIGNMENT_AUTO
A auto label alignment, is default.
|
static int |
ITEM_LABEL_ALIGNMENT_HORIZONTAL
A horizontal label alignment.
|
static int |
ITEM_LABEL_ALIGNMENT_VERTICAL
A vertical label alignment.
|
ITEM_LABEL_POSITION_BASE, ITEM_LABEL_POSITION_CENTER, ITEM_LABEL_POSITION_INSIDE_OF_MAX, ITEM_LABEL_POSITION_OUTSIDE_OF_MAX
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 and Description |
---|
BarPlot()
Creates a bar plot with default properties.
|
BarPlot(BarStyle style)
Creates a bar plot with defined chart style.
|
Modifier and Type | Method and Description |
---|---|
double |
getBarMarginPercent()
Returns the bar margin in percent where 0.10 is 10 percent.
|
double |
getBarWidth()
Returns the maximum bar width in percent where 0.10 is 10 percent.
|
int |
getItemLabelAlignment()
Returns the label alignment displayed on the items of this plot.
|
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 |
isShowTotal()
Returns the flag that controls whether or not the totals will be showed for each bar.
|
void |
readProperties(org.w3c.dom.Element element,
Chart2 chart)
Reads the chart properties from the DOMParser Element.
|
void |
setBarMarginPercent(double barMarginPercent)
Sets the bar margin (space between the bars).
|
void |
setBarWidth(double barWidth)
Sets the maximum bar width, which is specified as a percentage of the
available space for all bars,
|
void |
setCategoryAxis(GroupAxis categoryAxis)
Sets the axis for categories of this plot.
|
void |
setDataAxis(ContinuousNumberAxis dataAxis)
Sets the axis for data of this plot.
|
void |
setItemLabelAlignment(int itemLabelAlignment)
Sets the item label alignment.
|
void |
setShowTotal(boolean showTotal)
Sets the flag that controls whether or not the totals will be showed for each bar.
|
void |
setStyle(BarStyle style)
Sets a chart style of this bar plot.
|
getCategoryAxis, getDataAxis, getDataset, getItemLabelPosition, getReferencedObject, isShowCumulativeValues, refreshAutoTitles, saveSubProperties, setCategoryAxis, setDataAxis, setDataset, setItemLabelPosition, setShowCumulativeValues
getBackColor, getColorFormula, getColorSequence, getForegroundAlpha, getGradientSetting, getItemLabelColor, getItemLabelFont, getItemLabelFormat, getItemShape, getOutlineColor, getOutlineStyle, getOutlineWidth, isColorBySeries, isDrawOutline, isSameColorsForSameGroups, isShowLabel, isShowValue, saveProperties, setBackColor, setColorBySeries, setColorFormula, setColorSequence, setDrawOutline, setForegroundAlpha, setGradientSetting, setItemLabelColor, setItemLabelFont, setItemLabelFormat, setItemShape, setOutlineColor, setOutlineStyle, setOutlineWidth, setSameColorsForSameGroups, setShowLabel, setShowValue
public static final BarStyle DEFAULT_STYLE
public static final int ITEM_LABEL_ALIGNMENT_AUTO
public static final int ITEM_LABEL_ALIGNMENT_VERTICAL
public static final int ITEM_LABEL_ALIGNMENT_HORIZONTAL
public static final double DEFAULT_BAR_MARGIN_PERCENT
public static final double DEFAULT_BAR_WIDTH
public void setCategoryAxis(GroupAxis categoryAxis)
categoryAxis
- the category axis (null
not permitted)StandardPlot.getCategoryAxis()
,
GroupAxis
public void setDataAxis(ContinuousNumberAxis dataAxis)
dataAxis
- the data axis (null
not permitted)StandardPlot.getDataAxis()
,
ContinuousNumberAxis
public ChartStyle getStyle()
getStyle
in class StandardPlot
BarStyle.BAR2D
,
LineStyle.LINE_MARKER
,
AreaStyle.AREA2D_STACKED
public void setStyle(BarStyle style)
style
- the bar style (null
not permitted)getStyle()
,
BarStyle
public int getItemLabelAlignment()
setItemLabelAlignment(int)
,
ITEM_LABEL_ALIGNMENT_AUTO
,
ITEM_LABEL_ALIGNMENT_HORIZONTAL
,
ITEM_LABEL_ALIGNMENT_VERTICAL
public void setItemLabelAlignment(int itemLabelAlignment)
ITEM_LABEL_ALIGNMENT_AUTO
.itemLabelAlignment
- the item label alignmentjava.lang.IllegalArgumentException
- by unknown alignment.getItemLabelAlignment()
,
ITEM_LABEL_ALIGNMENT_AUTO
,
ITEM_LABEL_ALIGNMENT_HORIZONTAL
,
ITEM_LABEL_ALIGNMENT_VERTICAL
public boolean isShowTotal()
setShowTotal(boolean)
public void setShowTotal(boolean showTotal)
showTotal
- the flagisShowTotal()
,
BarStyle.BAR2D_STACKED
,
StandardPlot.setShowCumulativeValues(boolean)
public double getBarMarginPercent()
setBarMarginPercent(double)
public void setBarMarginPercent(double barMarginPercent)
barMarginPercent
- the margin (where 0.10 is ten percent)public double getBarWidth()
setBarWidth(double)
public void setBarWidth(double barWidth)
barWidth
- the width (where 0.10 is ten percent)getBarWidth()
protected java.lang.StringBuilder getSubProperties(int depth)
getSubProperties
in class StandardPlot
depth
- the depth of XML indentpublic void readProperties(org.w3c.dom.Element element, Chart2 chart)
readProperties
in interface ChartPlot
readProperties
in class StandardPlot
element
- the DOMParser Elementchart
- the chartCopyright © 1999-2020 by i-net software GmbH