Package com.inet.report.chart.plot
Class GanttPlot
java.lang.Object
com.inet.report.chart.plot.AbstractPlot
com.inet.report.chart.plot.GanttPlot
- All Implemented Interfaces:
ChartPlot
,Serializable
A general class for plotting data in the form of an start, end and progress value.
This plot can use data from any class that implements the
GanttDataset
interface.- Since:
- 8.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inet.report.chart.plot.AbstractPlot
AbstractPlot.GradientSetting
-
Field Summary
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
ConstructorDescriptionCreates a gantt plot with default properties.GanttPlot
(GanttStyle style) Creates a gantt plot with defined chart style. -
Method Summary
Modifier and TypeMethodDescriptionReturns the category axis of this plot.Returns the data axis of this plot.Returns a dataset of typeGanttDataset
.int
Returns the labels alignment of the items displayed on this plot.int
Returns the item label position on the chart item.getStyle()
Returns the style of this chart, ie. the general category this plot belongs to.protected StringBuilder
getSubProperties
(int depth) Returns the serialized simple properties of subclasses.void
readProperties
(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
(PrintWriter out, int depth) Writes the intern properties to output.void
setCategoryAxis
(GroupAxis categoryAxis) Sets the category axis for the plot.void
setDataAxis
(ContinuousDateAxis dataAxis) Sets the data axis of this plot.void
setDataset
(GanttDataset dataset) Sets the dataset for gantt chart.void
setItemLabelAlignment
(int itemLabelAlignment) Sets the item label alignment.void
setItemLabelPosition
(int itemLabelPosition) Sets the item label position on the chart item.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 Details
-
DEFAULT_STYLE
Default chart style with this plot.
-
-
Constructor Details
-
GanttPlot
public GanttPlot()Creates a gantt plot with default properties.- Since:
- 8.0
-
GanttPlot
Creates a gantt plot with defined chart style. Initializes all properties with default values.- Parameters:
style
- the chart style (null
not permitted)- Since:
- 8.0
- See Also:
-
-
Method Details
-
getDataset
Returns a dataset of typeGanttDataset
.- Returns:
- the dataset
- Since:
- 8.0
- See Also:
-
setDataset
Sets the dataset for gantt chart.- Parameters:
dataset
- the dataset (null
not permitted)- Since:
- 8.0
- See Also:
-
getCategoryAxis
Returns the category axis of this plot. The category axis shows the values of the first group field.- Returns:
- the categoryAxis
- Since:
- 8.0
- See Also:
-
setCategoryAxis
Sets the category axis for the plot. The category axis shows the values of the first group field.- Parameters:
categoryAxis
- the category axis (null
not permitted)- Since:
- 8.0
- See Also:
-
getDataAxis
Returns the data axis of this plot. The data axis shows the summarized values of the data fields.- Returns:
- the dataAxis
- Since:
- 8.0
- See Also:
-
setDataAxis
Sets the data axis of this plot. The data axis shows the summarized values of the data fields.- Parameters:
dataAxis
- the data axis (null
not permitted)- Since:
- 8.0
- See Also:
-
getStyle
Returns the style of this chart, ie. the general category this plot belongs to.- Specified by:
getStyle
in classAbstractPlot
- Returns:
- the style
- See Also:
-
getItemLabelAlignment
public int getItemLabelAlignment()Returns the labels alignment of the items displayed on this plot.- Returns:
- the alignment.
- Since:
- 8.0
- See Also:
-
setItemLabelAlignment
public void setItemLabelAlignment(int itemLabelAlignment) Sets the item label alignment. An item label is a label with name and value on each chart item. Default alignment isBarPlot.ITEM_LABEL_ALIGNMENT_AUTO
.- Parameters:
itemLabelAlignment
- the item label alignment- Throws:
IllegalArgumentException
- by unknown alignment.- Since:
- 8.0
- See Also:
-
getItemLabelPosition
public int getItemLabelPosition()Returns the item label position on the chart item.- Returns:
- the item label position.
- Since:
- 8.0
- See Also:
-
setItemLabelPosition
public void setItemLabelPosition(int itemLabelPosition) Sets the item label position on the chart item. An item label is a label with name and value on each chart item. Default position isStandardPlot.ITEM_LABEL_POSITION_OUTSIDE_OF_MAX
.- Parameters:
itemLabelPosition
- the itemLabelPosition to set- Throws:
IllegalArgumentException
- by unknown position.- Since:
- 8.0
- See Also:
-
refreshAutoTitles
Reads out the data column names from dataset and refreshes the chart labels. Please use this function to refresh the chart labels if the data was be changed.- Specified by:
refreshAutoTitles
in interfaceChartPlot
- Specified by:
refreshAutoTitles
in classAbstractPlot
- Parameters:
chart
- the chart
-
saveSubProperties
Writes the intern properties to output. Overwrites this to save intern properties direct toPrintWriter
without building aStringBuilder
.- Overrides:
saveSubProperties
in classAbstractPlot
- Parameters:
out
- the outputdepth
- the depth of XML indent
-
getSubProperties
Returns the serialized simple properties of subclasses.- Overrides:
getSubProperties
in classAbstractPlot
- Parameters:
depth
- the depth of XML indent- Returns:
- the properties.
-
readProperties
Reads the chart properties from the DOMParser Element.- Specified by:
readProperties
in interfaceChartPlot
- Overrides:
readProperties
in classAbstractPlot
- Parameters:
element
- the DOMParser Elementchart
- the chart
-
getReferencedObject
- Specified by:
getReferencedObject
in interfaceChartPlot
- Overrides:
getReferencedObject
in classAbstractPlot
- Returns:
- the list of objects.
-