public class TwoGroupsDataset extends com.inet.report.chart.dataset.AbstractDataset implements StandardDataset
TOKEN_DATASET
Constructor and Description |
---|
TwoGroupsDataset(Chart2 chart)
Creates a new empty dataset.
|
Modifier and Type | Method and Description |
---|---|
Group |
getCategoryGroup()
Returns the category group.
|
Chart2 |
getChart()
Returns the parent chart of this dataset.
|
SummaryField |
getDataField()
Returns the data field.
|
SummaryField |
getDataField(java.lang.String name)
Returns the summary field with the specified name or
null
if the summary field with this name not found in the list. |
java.util.List |
getDataFields()
Returns the data fields of this dataset as list.
|
com.inet.report.chart.dataset.LabelProvider |
getLabelProvider()
Returns the LabelProvider responsible for providing the title, footnote, and axis labels
|
protected java.lang.String |
getName() |
Group |
getSeriesGroup()
Returns the series group.
|
void |
removeCategoryGroup()
Removes the category group.
|
void |
removeDataField()
Removes the data field.
|
void |
removeSeriesGroup()
Removes the series group.
|
protected void |
saveGroups(java.io.PrintWriter out,
int depth) |
void |
setCategoryGroup(Field field)
Creates a category group on this field.
|
void |
setDataField(int summaryOperation,
Field field,
Field field2nd,
int nth)
Sets the data field which values will be calculated by the summary operation
and shown in the chart as i.e. bar length.
|
void |
setSeriesGroup(Field field)
Creates a series group on this field.
|
java.lang.String |
verify(ChartStyle style)
Verifies the group and sum properties of current dataset.
|
public TwoGroupsDataset(Chart2 chart)
chart
- the chart (null
not permitted)public Chart2 getChart()
getChart
in interface BaseDataset
public Group getCategoryGroup()
null
if this group was not initialized.setCategoryGroup(Field)
,
removeCategoryGroup()
public void setCategoryGroup(Field field)
PlotOrientation.VERTICAL
.
To change the sort order of the data in this group get this with getCategoryGroup()
and use the Group properties.
SummaryField
, SpecialField
and GroupField
are unsupported field types.field
- the group field (null
not permitted)java.lang.IllegalArgumentException
- if field is null
or has an unsupported field type.Group
,
getCategoryGroup()
,
removeCategoryGroup()
public void removeCategoryGroup()
setCategoryGroup(Field)
,
getCategoryGroup()
public Group getSeriesGroup()
null
if this group was not initialized.setSeriesGroup(Field)
,
removeSeriesGroup()
public void setSeriesGroup(Field field)
PlotOrientation.VERTICAL
.
The series group gets a own group axis by a chart with three axis (i.e. 3D chart) or it handles data grouped by category group.
To change the sort order of the data in this group get this with getSeriesGroup()
and use the Group properties.
SummaryField
, SpecialField
and GroupField
are unsupported field types.field
- (null
not permitted)java.lang.IllegalArgumentException
- if field is null
or has an unsupported field type.Group
,
getSeriesGroup()
,
removeSeriesGroup()
public void removeSeriesGroup()
setSeriesGroup(Field)
,
getSeriesGroup()
public SummaryField getDataField()
SummaryField
.setDataField(int, Field, Field, int)
public SummaryField getDataField(java.lang.String name)
null
if the summary field with this name not found in the list.
Testing for equality using the case sensitive equals method.getDataField
in interface BaseDataset
name
- the searched name of summary field (null
not permitted)null
.BaseDataset.getDataFields()
public java.util.List getDataFields()
getDataFields
in interface BaseDataset
BaseDataset.getDataField(String)
public void setDataField(int summaryOperation, Field field, Field field2nd, int nth)
SummaryField
with this field, operation and parameters.SummaryField
.summaryOperation
- the summary operationfield
- the data fieldfield2nd
- the second data field, used for example for weights in weighted average SummaryField.WEIGHTED_AVERAGE
.nth
- the nth parameter, used for example by summary operation SummaryField.NTH_LARGEST
java.lang.IllegalArgumentException
- if the first or second field are required and null
or have an unsupported value type.java.lang.IllegalArgumentException
- if nth is less than zero.getDataField()
,
SummaryField.setSummaryOperation(int)
,
SummaryField.setField(Field)
,
SummaryField.setField2nd(Field)
,
SummaryField.setSummaryNth(int)
public void removeDataField()
setDataField(int, Field, Field, int)
,
getDataField()
public java.lang.String verify(ChartStyle style)
verify
in interface BaseDataset
style
- the chart styleprotected void saveGroups(java.io.PrintWriter out, int depth)
saveGroups
in class com.inet.report.chart.dataset.AbstractDataset
protected java.lang.String getName()
getName
in class com.inet.report.chart.dataset.AbstractDataset
public com.inet.report.chart.dataset.LabelProvider getLabelProvider()
getLabelProvider
in interface BaseDataset
Copyright © 1999-2020 by i-net software GmbH