public class XYPlot extends AbstractPlot
XYDataset
interface.AbstractPlot.GradientSetting
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_SIZE_COEFFICIENT
The default bubble size coefficient.
|
static XYStyle |
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 |
---|
XYPlot()
Creates a xy plot (e.g. scatter or bubble) with default properties.
|
XYPlot(XYStyle style)
Creates a xy plot (e.g. scatter or bubble) with defined chart style.
|
Modifier and Type | Method and Description |
---|---|
ContinuousNumberAxis |
getCategoryAxis()
Returns the category axis for this plot.
|
ContinuousNumberAxis |
getDataAxis()
Returns the data axis for this plot.
|
XYDataset |
getDataset()
Returns a dataset of type
XYDataset . |
java.util.List |
getReferencedObject()
|
double |
getSizeCoefficient()
Returns the size coefficient of chart items.
|
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.
|
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 |
setCategoryAxis(ContinuousNumberAxis categoryAxis)
Sets the category axis for this plot.
|
void |
setDataAxis(ContinuousNumberAxis dataAxis)
Sets the data axis for this plot.
|
void |
setDataset(XYDataset dataset)
Sets the dataset for this plot.
|
void |
setSizeCoefficient(double sizeCoefficient)
Sets the size coefficient of the bubbles.
|
void |
setStyle(XYStyle style)
Sets the chart style of this plot.
|
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 XYStyle DEFAULT_STYLE
public static final double DEFAULT_SIZE_COEFFICIENT
public XYPlot()
public XYDataset getDataset()
XYDataset
.setDataset(XYDataset)
,
XYForAllRecordsDataset
,
XYForEachRecordDataset
,
XYOneGroupDataset
public void setDataset(XYDataset dataset)
dataset
- the dataset to set (null
not permitted),getDataset()
,
XYDataset
,
XYForAllRecordsDataset
,
XYForEachRecordDataset
,
XYOneGroupDataset
public ContinuousNumberAxis getCategoryAxis()
setCategoryAxis(ContinuousNumberAxis)
,
ContinuousNumberAxis
public void setCategoryAxis(ContinuousNumberAxis categoryAxis)
categoryAxis
- the category axis (null
not permitted)getCategoryAxis()
,
ContinuousNumberAxis
public ContinuousNumberAxis getDataAxis()
setDataAxis(ContinuousNumberAxis)
,
ContinuousNumberAxis
public void setDataAxis(ContinuousNumberAxis dataAxis)
dataAxis
- the data axis (null
not permitted)getDataAxis()
,
ContinuousNumberAxis
public ChartStyle getStyle()
getStyle
in class AbstractPlot
BarStyle.BAR2D
,
LineStyle.LINE_MARKER
,
AreaStyle.AREA2D_STACKED
public void setStyle(XYStyle style)
style
- the style (null
not permitted)getStyle()
,
XYStyle
public double getSizeCoefficient()
setSizeCoefficient(double)
public void setSizeCoefficient(double sizeCoefficient)
XYStyle.BUBBLE
. To set the shape size of scatter chart please use thisAbstractPlot.setItemShape(ItemShape)
.sizeCoefficient
- the coefficientjava.lang.IllegalArgumentException
- if the coefficient is out of range.getSizeCoefficient()
,
DEFAULT_SIZE_COEFFICIENT
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 chartpublic java.util.List getReferencedObject()
getReferencedObject
in interface ChartPlot
getReferencedObject
in class AbstractPlot
Copyright © 1999-2020 by i-net software GmbH