public class PiePlot extends AbstractPlot
BaseDataset
interface.AbstractPlot.GradientSetting
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_EXPAND_PERCENT
The default expand percent.
|
static int |
DEFAULT_ITEM_LABEL_BACKGROUND_COLOR
The default background color of the item label.
|
static double |
DEFAULT_ITEM_LABEL_GAP
The default gap of the item labels.
|
static int |
DEFAULT_ITEM_LABEL_OUTLINE_COLOR
The default outline color of the item label.
|
static int |
DEFAULT_ITEM_LABEL_OUTLINE_STYLE
The default outline style of the item label.
|
static int |
DEFAULT_ITEM_LABEL_OUTLINE_WIDTH
The default outline width of the item label.
|
static double |
DEFAULT_ROTATION_ANGLE
The default rotating angle.
|
static PieStyle |
DEFAULT_STYLE
Default chart style with this plot.
|
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 |
---|
PiePlot()
Creates a pie plot with default properties.
|
PiePlot(PieStyle style)
Creates a pie plot with defined chart style.
|
Modifier and Type | Method and Description |
---|---|
BaseDataset |
getDataset()
Returns a dataset of type
PieDataset . |
double |
getExpandPercent()
Returns the detach percentage of sections selected with
setSectionIndexes(int[]) . |
int |
getItemLabelBackColor()
Returns the ABGR value representing the background color of item labels .
|
double |
getItemLabelGap()
Returns the gap between the pie and the item label.
|
int |
getItemLabelOutlineColor()
Returns the ABGR value representing the legend outline color.
|
int |
getItemLabelOutlineStyle()
Returns the border line style of item labels.
|
int |
getItemLabelOutlineWidth()
Returns the outline width of item labels.
|
PieLegendLayout |
getLegendLayout()
Returns the legend layout.
|
double |
getRotationAngle()
Returns the rotation angle of pie.
|
int[] |
getSectionIndexes()
Returns the sections indexes which will be expanded.
|
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 |
isDrawItemLabelOutline()
Returns whether or not to draw the item label outline.
|
boolean |
isIgnoreZeroValues()
Returns the flag that controls whether or not the null and zero values will be ignored.
|
protected void |
readDataset(org.w3c.dom.Element element,
Chart2 chart)
Reads the dataset properties from DOM element.
|
void |
readProperties(org.w3c.dom.Element element,
Chart2 chart)
Reads the chart properties from the DOMParser Element.
|
void |
refreshAutoTitles(Chart2 chart)
Reads out the data column names from dataset and refreshes the chart labels.
|
protected void |
saveSubProperties(java.io.PrintWriter out,
int depth)
Writes the intern properties to output.
|
void |
setDataset(PieDataset dataset)
Sets a pie dataset for this chart.
|
void |
setDrawItemLabelOutline(boolean drawOutline)
Sets whether or not to draw the item label outline.
|
void |
setExpandPercent(double expandPercent)
Sets the detach percentage of sections selected with
setSectionIndexes(int[]) . |
void |
setIgnoreZeroValues(boolean ignoreZeroValues)
Sets the flag that controls whether or not the null and zero values will be ignored.
|
void |
setItemLabelBackColor(int backgroundColor)
Sets the ABGR value representing the background color of item labels.
|
void |
setItemLabelGap(double itemLabelGap)
Sets the gap between the pie and the item label.
|
void |
setItemLabelOutlineColor(int outlineColor)
Sets the ABGR components of the legend outline color.
|
void |
setItemLabelOutlineStyle(int itemLabelOutlineStyle)
Sets the border line style of item labels.
|
void |
setItemLabelOutlineWidth(int itemLabelOutlineWidth)
Sets the item labels outline width in twips.
|
void |
setLegendLayout(PieLegendLayout legendLayout)
Sets the legend layout.
|
void |
setRotationAngle(double rotationAngle)
Sets the rotation angle of pie.
|
void |
setSectionIndexes(int[] sectionIndexes)
Sets the sections indexes which will be expanded.
|
void |
setStyle(PieStyle style)
Sets the chart style of this plot.
|
getBackColor, getColorFormula, getColorSequence, getForegroundAlpha, getGradientSetting, getItemLabelColor, getItemLabelFont, getItemLabelFormat, getItemShape, getOutlineColor, getOutlineStyle, getOutlineWidth, getReferencedObject, 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 PieStyle DEFAULT_STYLE
public static final double DEFAULT_ROTATION_ANGLE
public static final double DEFAULT_ITEM_LABEL_GAP
public static final int DEFAULT_ITEM_LABEL_BACKGROUND_COLOR
public static final int DEFAULT_ITEM_LABEL_OUTLINE_COLOR
public static final int DEFAULT_ITEM_LABEL_OUTLINE_STYLE
public static final int DEFAULT_ITEM_LABEL_OUTLINE_WIDTH
public static final double DEFAULT_EXPAND_PERCENT
public BaseDataset getDataset()
PieDataset
.setDataset(PieDataset)
,
ForAllRecordsDataset
,
ForEachRecordDataset
,
OneGroupDataset
public void setDataset(PieDataset dataset)
dataset
- the pie dataset (null
not permitted)getDataset()
,
PieDataset
,
ForAllRecordsDataset
,
ForEachRecordDataset
,
OneGroupDataset
public ChartStyle getStyle()
getStyle
in class AbstractPlot
BarStyle.BAR2D
,
LineStyle.LINE_MARKER
,
AreaStyle.AREA2D_STACKED
public void setStyle(PieStyle style)
style
- the stylegetStyle()
,
PieStyle
public boolean isIgnoreZeroValues()
false
.setIgnoreZeroValues(boolean)
public void setIgnoreZeroValues(boolean ignoreZeroValues)
false
.ignoreZeroValues
- the flagisIgnoreZeroValues()
public double getRotationAngle()
setRotationAngle(double)
public void setRotationAngle(double rotationAngle)
DEFAULT_ROTATION_ANGLE
rotationAngle
- the rotation anglegetRotationAngle()
public double getItemLabelGap()
setItemLabelGap(double)
public void setItemLabelGap(double itemLabelGap)
DEFAULT_ITEM_LABEL_GAP
.itemLabelGap
- the item label gapjava.lang.IllegalArgumentException
- if the gap is a negative value.getItemLabelGap()
public boolean isDrawItemLabelOutline()
true
the outline is to be drawn.setDrawItemLabelOutline(boolean)
public void setDrawItemLabelOutline(boolean drawOutline)
drawOutline
- true
if outline is to be drawn.isDrawItemLabelOutline()
public int getItemLabelBackColor()
setItemLabelBackColor(int)
,
ColorUtils.toJavaColor(int)
public void setItemLabelBackColor(int backgroundColor)
backgroundColor
- the background colorgetItemLabelBackColor()
,
ColorUtils.toCcColor(Color)
public int getItemLabelOutlineColor()
AbstractPlot.setOutlineColor(int)
,
ColorUtils.toJavaColor(int)
public void setItemLabelOutlineColor(int outlineColor)
outlineColor
- a colorjava.lang.IllegalArgumentException
- if the color is RDC.COLOR_NO_COLOR
.AbstractPlot.getOutlineColor()
,
ColorUtils.toCcColor(Color)
public int getItemLabelOutlineStyle()
setItemLabelOutlineStyle(int)
public void setItemLabelOutlineStyle(int itemLabelOutlineStyle)
itemLabelOutlineStyle
- a outline stylejava.lang.IllegalArgumentException
- by unsupported line style.getItemLabelOutlineStyle()
,
BorderPropertiesConstants.LINE_STYLE_DASHED
,
BorderPropertiesConstants.LINE_STYLE_DOTTED
,
BorderPropertiesConstants.LINE_STYLE_SINGLE
,
BorderPropertiesConstants.NO_LINE
public int getItemLabelOutlineWidth()
setItemLabelOutlineWidth(int)
public void setItemLabelOutlineWidth(int itemLabelOutlineWidth)
itemLabelOutlineWidth
- the outline widthjava.lang.IllegalArgumentException
- if width is less than 1.getItemLabelOutlineWidth()
public PieLegendLayout getLegendLayout()
setLegendLayout(PieLegendLayout)
,
PieLegendLayout
public void setLegendLayout(PieLegendLayout legendLayout)
legendLayout
- a legend layout (null
not permitted)getLegendLayout()
,
PieLegendLayout
public int[] getSectionIndexes()
setSectionIndexes(int[])
public void setSectionIndexes(int[] sectionIndexes)
setExpandPercent(double)
.
The array of indexes is 0 based.sectionIndexes
- the array of sections indexes (null
not permitted)java.lang.IllegalArgumentException
- if the array is null
.getSectionIndexes()
,
setExpandPercent(double)
public double getExpandPercent()
setSectionIndexes(int[])
.setExpandPercent(double)
public void setExpandPercent(double expandPercent)
setSectionIndexes(int[])
.expandPercent
- the expand percentage (0.30 = 30 percent)java.lang.IllegalArgumentException
- if the percent is a negative value.getExpandPercent()
,
setSectionIndexes(int[])
public void refreshAutoTitles(Chart2 chart)
refreshAutoTitles
in interface ChartPlot
refreshAutoTitles
in class AbstractPlot
chart
- the chartprotected java.lang.StringBuilder getSubProperties(int depth)
getSubProperties
in class AbstractPlot
depth
- the depth of XML indentprotected void saveSubProperties(java.io.PrintWriter out, int depth)
PrintWriter
without building a StringBuilder
.saveSubProperties
in class AbstractPlot
out
- the outputdepth
- the depth of XML indentpublic void readProperties(org.w3c.dom.Element element, Chart2 chart)
readProperties
in interface ChartPlot
readProperties
in class AbstractPlot
element
- the DOMParser Elementchart
- the chartprotected void readDataset(org.w3c.dom.Element element, Chart2 chart)
element
- the DOM elementchart
- the chartCopyright © 1999-2018 by i-net software GmbH