public class ChartMaker
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ChartMaker.ChartDataType |
Constructor and Description |
---|
ChartMaker(java.util.Set<DataRecord> dataRecords)
Instantiates a new chart maker.
|
Modifier and Type | Method and Description |
---|---|
org.jfree.chart.JFreeChart |
createCategoryChart(ChartType type,
java.lang.String categoryField,
java.lang.String domainField,
java.lang.String dataField,
ChartMaker.ChartDataType dataType)
Creates the category chart.
|
org.jfree.data.category.CategoryDataset |
createCategoryDataset(java.lang.String categoryField,
java.lang.String domainField,
java.lang.String dataField,
ChartMaker.ChartDataType type)
Creates the category dataset.
|
org.jfree.chart.JFreeChart |
createChart(ChartType type,
java.lang.String categoryField,
java.lang.String domainField,
java.lang.String dataField,
ChartMaker.ChartDataType dataType)
Creates the chart.
|
org.jfree.chart.JFreeChart |
createPieChart(ChartType type,
java.lang.String field,
java.lang.String dataField,
ChartMaker.ChartDataType dataType)
Creates the pie chart.
|
org.jfree.data.general.PieDataset |
createPieDataset(java.lang.String field,
java.lang.String dataField,
ChartMaker.ChartDataType type)
Creates the pie dataset.
|
java.util.Set<java.lang.String> |
getAllFieldNames()
Gets the all field names.
|
DataType |
getFieldType(java.lang.String fieldName)
Gets the field type.
|
int |
getMaxCategoryCount()
Gets the max category count.
|
boolean |
isCategoryField(java.lang.String fieldName)
Checks if is category field.
|
boolean |
isNumericField(java.lang.String fieldName)
Checks if is numeric field.
|
boolean |
isUse3dEffects()
Checks if is use3d effects.
|
void |
setDataFilter(DataFilter dataFilter)
Sets the data filter.
|
void |
setDataRecords(java.util.Set<DataRecord> dataRecords)
Sets the data records.
|
void |
setMaxCategoryCount(int count)
Sets the max category count.
|
void |
setTimeIncrement(java.lang.String timeField,
int interval)
Set the time interval for a time field explicitly.
|
void |
setUse3dEffects(boolean use3dFlag)
Sets the use3d effects.
|
public ChartMaker(java.util.Set<DataRecord> dataRecords)
dataRecords
- the data recordspublic org.jfree.chart.JFreeChart createCategoryChart(ChartType type, java.lang.String categoryField, java.lang.String domainField, java.lang.String dataField, ChartMaker.ChartDataType dataType)
type
- the typecategoryField
- the category fielddomainField
- the domain fielddataField
- the data fielddataType
- the data typepublic org.jfree.data.category.CategoryDataset createCategoryDataset(java.lang.String categoryField, java.lang.String domainField, java.lang.String dataField, ChartMaker.ChartDataType type)
categoryField
- the category fielddomainField
- the domain fielddataField
- the data fieldtype
- the typepublic org.jfree.chart.JFreeChart createChart(ChartType type, java.lang.String categoryField, java.lang.String domainField, java.lang.String dataField, ChartMaker.ChartDataType dataType)
type
- the typecategoryField
- the category fielddomainField
- the domain fielddataField
- the data fielddataType
- the data typepublic org.jfree.chart.JFreeChart createPieChart(ChartType type, java.lang.String field, java.lang.String dataField, ChartMaker.ChartDataType dataType)
type
- the typefield
- the fielddataField
- the data fielddataType
- the data typepublic org.jfree.data.general.PieDataset createPieDataset(java.lang.String field, java.lang.String dataField, ChartMaker.ChartDataType type)
field
- the fielddataField
- the data fieldtype
- the typepublic java.util.Set<java.lang.String> getAllFieldNames()
public DataType getFieldType(java.lang.String fieldName)
fieldName
- the field namepublic int getMaxCategoryCount()
public boolean isCategoryField(java.lang.String fieldName)
fieldName
- the field namepublic boolean isNumericField(java.lang.String fieldName)
fieldName
- the field namepublic boolean isUse3dEffects()
public void setDataFilter(DataFilter dataFilter)
dataFilter
- the new data filterpublic void setDataRecords(java.util.Set<DataRecord> dataRecords)
dataRecords
- the new data recordspublic void setMaxCategoryCount(int count)
count
- the maxCategoryCount to setpublic void setTimeIncrement(java.lang.String timeField, int interval)
timeField
- the time fieldinterval
- the intervalpublic void setUse3dEffects(boolean use3dFlag)
use3dFlag
- the use3d to set