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,java.io.Serializable
public class GanttPlot extends AbstractPlot
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 theGanttDatasetinterface.- 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 GanttStyleDEFAULT_STYLEDefault chart style with this plot.-
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 GanttPlot()Creates a gantt plot with default properties.GanttPlot(GanttStyle style)Creates a gantt plot with defined chart style.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GroupAxisgetCategoryAxis()Returns the category axis of this plot.ContinuousDateAxisgetDataAxis()Returns the data axis of this plot.GanttDatasetgetDataset()Returns a dataset of typeGanttDataset.intgetItemLabelAlignment()Returns the labels alignment of the items displayed on this plot.intgetItemLabelPosition()Returns the item label position on the chart item.java.util.ListgetReferencedObject()ChartStylegetStyle()Returns the style of this chart, ie.protected java.lang.StringBuildergetSubProperties(int depth)Returns the serialized simple properties of subclasses.voidreadProperties(org.w3c.dom.Element element, Chart2 chart)Reads the chart properties from the DOMParser Element.voidrefreshAutoTitles(Chart2 chart)Reads out the data column names from dataset and refreshes the chart labels.protected voidsaveSubProperties(java.io.PrintWriter out, int depth)Writes the intern properties to output.voidsetCategoryAxis(GroupAxis categoryAxis)Sets the category axis for the plot.voidsetDataAxis(ContinuousDateAxis dataAxis)Sets the data axis of this plot.voidsetDataset(GanttDataset dataset)Sets the dataset for gantt chart.voidsetItemLabelAlignment(int itemLabelAlignment)Sets the item label alignment.voidsetItemLabelPosition(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 Detail
-
DEFAULT_STYLE
public static final GanttStyle DEFAULT_STYLE
Default chart style with this plot.
-
-
Constructor Detail
-
GanttPlot
public GanttPlot()
Creates a gantt plot with default properties.- Since:
- 8.0
-
GanttPlot
public GanttPlot(GanttStyle style)
Creates a gantt plot with defined chart style. Initializes all properties with default values.- Parameters:
style- the chart style (nullnot permitted)- Since:
- 8.0
- See Also:
GanttStyle
-
-
Method Detail
-
getDataset
public GanttDataset getDataset()
Returns a dataset of typeGanttDataset.- Returns:
- the dataset
- Since:
- 8.0
- See Also:
setDataset(GanttDataset),GanttForEachRecordDataset,GanttOneGroupDataset,GanttTwoGroupsDataset
-
setDataset
public void setDataset(GanttDataset dataset)
Sets the dataset for gantt chart.- Parameters:
dataset- the dataset (nullnot permitted)- Since:
- 8.0
- See Also:
getDataset(),GanttDataset,GanttForEachRecordDataset,GanttOneGroupDataset,GanttTwoGroupsDataset
-
getCategoryAxis
public GroupAxis 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(GroupAxis),GroupAxis
-
setCategoryAxis
public void setCategoryAxis(GroupAxis categoryAxis)
Sets the category axis for the plot. The category axis shows the values of the first group field.- Parameters:
categoryAxis- the category axis (nullnot permitted)- Since:
- 8.0
- See Also:
getCategoryAxis(),GroupAxis
-
getDataAxis
public ContinuousDateAxis 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(ContinuousDateAxis),ContinuousDateAxis
-
setDataAxis
public void setDataAxis(ContinuousDateAxis dataAxis)
Sets the data axis of this plot. The data axis shows the summarized values of the data fields.- Parameters:
dataAxis- the data axis (nullnot permitted)- Since:
- 8.0
- See Also:
getDataAxis(),ContinuousDateAxis
-
getStyle
public ChartStyle getStyle()
Returns the style of this chart, ie. the general category this plot belongs to.- Specified by:
getStylein classAbstractPlot- Returns:
- the style
- See Also:
BarStyle.BAR2D,LineStyle.LINE_MARKER,AreaStyle.AREA2D_STACKED
-
getItemLabelAlignment
public int getItemLabelAlignment()
Returns the labels alignment of the items displayed on this plot.- Returns:
- the alignment.
- Since:
- 8.0
- See Also:
setItemLabelAlignment(int),BarPlot.ITEM_LABEL_ALIGNMENT_AUTO,BarPlot.ITEM_LABEL_ALIGNMENT_HORIZONTAL,BarPlot.ITEM_LABEL_ALIGNMENT_VERTICAL
-
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:
java.lang.IllegalArgumentException- by unknown alignment.- Since:
- 8.0
- See Also:
getItemLabelAlignment(),BarPlot.ITEM_LABEL_ALIGNMENT_AUTO,BarPlot.ITEM_LABEL_ALIGNMENT_HORIZONTAL,BarPlot.ITEM_LABEL_ALIGNMENT_VERTICAL
-
getItemLabelPosition
public int getItemLabelPosition()
Returns the item label position on the chart item.- Returns:
- the item label position.
- Since:
- 8.0
- See Also:
setItemLabelPosition(int),StandardPlot.ITEM_LABEL_POSITION_BASE,StandardPlot.ITEM_LABEL_POSITION_CENTER,StandardPlot.ITEM_LABEL_POSITION_INSIDE_OF_MAX,StandardPlot.ITEM_LABEL_POSITION_OUTSIDE_OF_MAX
-
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:
java.lang.IllegalArgumentException- by unknown position.- Since:
- 8.0
- See Also:
setItemLabelPosition(int),StandardPlot.ITEM_LABEL_POSITION_BASE,StandardPlot.ITEM_LABEL_POSITION_CENTER,StandardPlot.ITEM_LABEL_POSITION_INSIDE_OF_MAX,StandardPlot.ITEM_LABEL_POSITION_OUTSIDE_OF_MAX
-
refreshAutoTitles
public void refreshAutoTitles(Chart2 chart)
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:
refreshAutoTitlesin interfaceChartPlot- Specified by:
refreshAutoTitlesin classAbstractPlot- Parameters:
chart- the chart
-
saveSubProperties
protected void saveSubProperties(java.io.PrintWriter out, int depth)Writes the intern properties to output. Overwrites this to save intern properties direct toPrintWriterwithout building aStringBuilder.- Overrides:
saveSubPropertiesin classAbstractPlot- Parameters:
out- the outputdepth- the depth of XML indent
-
getSubProperties
protected java.lang.StringBuilder getSubProperties(int depth)
Returns the serialized simple properties of subclasses.- Overrides:
getSubPropertiesin classAbstractPlot- Parameters:
depth- the depth of XML indent- Returns:
- the properties.
-
readProperties
public void readProperties(org.w3c.dom.Element element, Chart2 chart)Reads the chart properties from the DOMParser Element.- Specified by:
readPropertiesin interfaceChartPlot- Overrides:
readPropertiesin classAbstractPlot- Parameters:
element- the DOMParser Elementchart- the chart
-
getReferencedObject
public java.util.List getReferencedObject()
- Specified by:
getReferencedObjectin interfaceChartPlot- Overrides:
getReferencedObjectin classAbstractPlot- Returns:
- the list of objects.
-
-