|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.eng.spagobi.engines.chart.bo.ChartImpl
it.eng.spagobi.engines.chart.bo.charttypes.barcharts.BarCharts
public class BarCharts
Field Summary | |
---|---|
static java.lang.String |
CATEGORY_LABEL
Label for category Axis |
static java.lang.String |
DYNAMIC_N_VISUALIZATION
If true enable dynamic choice of numbers of categories to view |
static java.lang.String |
ENABLE_TOOLTIPS
If true enables tooltips |
static java.lang.String |
FILTER_CAT_GROUPS
If true enables filtering of cat Groups |
static java.lang.String |
FILTER_CATEGORIES
If true enables filtering of categories |
static java.lang.String |
FILTER_SERIES
If true enables filtering of series |
static java.lang.String |
FILTER_SERIES_BUTTONS
If true shows select all and deselect all buttons from serie filters |
static java.lang.String |
FIRST_AXIS_LB
|
static java.lang.String |
FIRST_AXIS_UB
name of the tag that specifies color for each serie name |
static java.lang.String |
MAXIMUM_BAR_WIDTH
the maximum bar width, which is specified as a percentage of the available space for all bars For Example setting to 0.05 will ensure that the bars never exceed five per cent of the lenght of the axis |
static java.lang.String |
N_CAT_VISUALIZATION
Number of categories visualization (both) |
static java.lang.String |
N_SER_VISUALIZATION
Number of series visualization |
static java.lang.String |
N_VISUALIZATION
|
static java.lang.String |
RANGE_AXIS_LOCATION
the location of the range axis. |
static java.lang.String |
RANGE_INTEGER_VALUES
Range Integer; If this string equals true on the range axis only int values appear Possible Values: TRUE or FALSE (the same as null), Default is False |
static java.lang.String |
SECOND_AXIS_LB
|
static java.lang.String |
SECOND_AXIS_UB
|
static java.lang.String |
SERIES_COLORS
name of the tag that specifies color for each serie name |
static java.lang.String |
SERIES_ORDER_COLORS
name of the tag that specifies color for series in order of apparition |
static java.lang.String |
SHOW_VALUE_LABLES
If true show value labels |
static java.lang.String |
VALUE_LABEL
Label for value Axis |
static java.lang.String |
VALUE_LABELS_POSITION
value labels position: values inside and outside |
Constructor Summary | |
---|---|
BarCharts()
|
Method Summary | |
---|---|
DatasetMap |
calculateValue()
Inherited by IChart: calculates chart value. |
void |
configureChart(it.eng.spago.base.SourceBean content)
Calculates chart value; public Dataset calculateValue(String cat, Map parameters) throws Exception { logger.debug("IN"); String res=DataSetAccessFunctions.getDataSetResult(profile, getData(),parameters); DefaultCategoryDataset dataset = new DefaultCategoryDataset(); SourceBean sbRows=SourceBean.fromXMLString(res); List listAtts=sbRows.getAttributeAsList("ROW"); // run all categories (one for each row) categoriesNumber=0; for (Iterator iterator = listAtts.iterator(); iterator.hasNext();) { SourceBean category = (SourceBean) iterator.next(); List atts=category.getContainedAttributes(); HashMap series=new HashMap(); String catValue=""; String name=""; String value=""; //run all the attributes, to define series! for (Iterator iterator2 = atts.iterator(); iterator2.hasNext();) { SourceBeanAttribute object = (SourceBeanAttribute) iterator2.next(); name=new String(object.getKey()); value=new String((String)object.getValue()); if(name.equalsIgnoreCase("x"))catValue=value; else series.put(name, value); } for (Iterator iterator3 = series.keySet().iterator(); iterator3.hasNext();) { String nameS = (String) iterator3.next(); String valueS=(String)series.get(nameS); dataset.addValue(Double.valueOf(valueS).doubleValue(), nameS, catValue); categoriesNumber=categoriesNumber+1; } } logger.debug("OUT"); return dataset; } |
org.jfree.chart.JFreeChart |
createChart(DatasetMap dataset)
This function creates the chart object. |
org.jfree.data.general.Dataset |
filterDataset(org.jfree.data.general.Dataset dataset,
java.util.HashMap categories,
int catSelected,
int numberCatsVisualization)
Use for slider: limits the categories visualization from cat selected to cat selected+numberscatsVisualization. |
org.jfree.data.general.Dataset |
filterDatasetCatGroups(org.jfree.data.general.Dataset dataset,
java.util.Vector groups)
|
org.jfree.data.general.Dataset |
filterDatasetSeries(org.jfree.data.general.Dataset dataset,
java.util.Vector series)
Limits the dataset to a particular serie. |
java.util.Map |
getCategories()
Gets the categories. |
int |
getCategoriesNumber()
Gets the categories number. |
java.lang.String |
getCategoryLabel()
Gets the category label. |
java.util.Vector |
getCatGroupNames()
|
java.util.HashMap |
getCatGroups()
|
java.util.Map |
getConfParameters()
Gets the conf parameters. |
java.util.Vector |
getCurrentCatGroups()
|
java.util.Vector |
getCurrentSeries()
|
java.lang.String |
getFilterStyle()
|
java.lang.Integer |
getNumberCatVisualization()
Gets the number cat visualization. |
java.lang.Integer |
getNumberSerVisualization()
|
java.util.Vector |
getSeriesNames()
|
java.util.HashMap |
getSeriesNumber()
|
java.util.ArrayList<java.lang.String> |
getSeriesOrder()
|
java.lang.String |
getValueLabel()
Gets the value label. |
boolean |
isDynamicNumberCatVisualization()
|
boolean |
isFilterCategories()
|
boolean |
isFilterCatGroups()
|
boolean |
isFilterSeries()
|
boolean |
isFilterSeriesButtons()
|
void |
putSeriesNumber(java.lang.String name,
int index)
|
void |
setCategoriesNumber(int categoriesNumber)
Sets the categories number. |
void |
setCategoryLabel(java.lang.String categoryLabel)
Sets the category label. |
void |
setCatGroupNames(java.util.Vector catGroupNames)
|
void |
setCatGroups(java.util.HashMap catGroups)
|
void |
setConfParameters(java.util.Map confParameters)
Sets the conf parameters. |
void |
setCurrentCatGroups(java.util.Vector currentCatGroups)
|
void |
setCurrentSeries(java.util.Vector currentSeries)
|
void |
setDynamicNumberCatVisualization(boolean dynamicNumberCatVisualization)
|
void |
setFilterCategories(boolean filterCategories)
|
void |
setFilterCatGroups(boolean filterCatGroups)
|
void |
setFilterSeries(boolean filterSeries)
|
void |
setFilterSeriesButtons(boolean filterSeriesButtons)
|
void |
setFilterStyle(java.lang.String filterStyle)
|
void |
setNumberCatVisualization(java.lang.Integer numberCatVisualization)
Sets the number cat visualization. |
void |
setNumberSerVisualization(java.lang.Integer numberSerVisualization)
|
void |
setSeriesNames(java.util.Vector seriesNames)
|
void |
setSeriesOrder(java.util.ArrayList<java.lang.String> seriesOrder)
|
void |
setValueLabel(java.lang.String valueLabel)
Sets the value label. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CATEGORY_LABEL
public static final java.lang.String VALUE_LABEL
public static final java.lang.String N_CAT_VISUALIZATION
public static final java.lang.String N_VISUALIZATION
public static final java.lang.String DYNAMIC_N_VISUALIZATION
public static final java.lang.String N_SER_VISUALIZATION
public static final java.lang.String FILTER_CAT_GROUPS
public static final java.lang.String FILTER_SERIES
public static final java.lang.String FILTER_SERIES_BUTTONS
public static final java.lang.String FILTER_CATEGORIES
public static final java.lang.String SHOW_VALUE_LABLES
public static final java.lang.String VALUE_LABELS_POSITION
public static final java.lang.String ENABLE_TOOLTIPS
public static final java.lang.String MAXIMUM_BAR_WIDTH
public static final java.lang.String RANGE_INTEGER_VALUES
public static final java.lang.String RANGE_AXIS_LOCATION
public static final java.lang.String SERIES_ORDER_COLORS
public static final java.lang.String SERIES_COLORS
public static final java.lang.String FIRST_AXIS_UB
public static final java.lang.String FIRST_AXIS_LB
public static final java.lang.String SECOND_AXIS_UB
public static final java.lang.String SECOND_AXIS_LB
Constructor Detail |
---|
public BarCharts()
Method Detail |
---|
public DatasetMap calculateValue() throws java.lang.Exception
calculateValue
in interface IChart
calculateValue
in class ChartImpl
java.lang.Exception
- the exceptionpublic void configureChart(it.eng.spago.base.SourceBean content)
configureChart
in interface IChart
configureChart
in class ChartImpl
content
- the contentpublic java.lang.String getFilterStyle()
public void setFilterStyle(java.lang.String filterStyle)
filterStyle
- the filterStyle to setpublic org.jfree.data.general.Dataset filterDataset(org.jfree.data.general.Dataset dataset, java.util.HashMap categories, int catSelected, int numberCatsVisualization)
filterDataset
in interface IChart
filterDataset
in class ChartImpl
dataset
- the datasetcategories
- the categoriescatSelected
- the cat selectednumberCatsVisualization
- the number cats visualization
public org.jfree.data.general.Dataset filterDatasetSeries(org.jfree.data.general.Dataset dataset, java.util.Vector series)
dataset
- the datasetserie
- the serie
public org.jfree.data.general.Dataset filterDatasetCatGroups(org.jfree.data.general.Dataset dataset, java.util.Vector groups)
public java.util.Map getConfParameters()
public void setConfParameters(java.util.Map confParameters)
confParameters
- the new conf parameterspublic org.jfree.chart.JFreeChart createChart(DatasetMap dataset)
ChartImpl
createChart
in interface IChart
createChart
in class ChartImpl
dataset
- the dataset
public java.lang.String getCategoryLabel()
public void setCategoryLabel(java.lang.String categoryLabel)
categoryLabel
- the new category labelpublic java.lang.String getValueLabel()
public void setValueLabel(java.lang.String valueLabel)
valueLabel
- the new value labelpublic int getCategoriesNumber()
public void setCategoriesNumber(int categoriesNumber)
categoriesNumber
- the new categories numberpublic java.util.Map getCategories()
public java.lang.Integer getNumberCatVisualization()
public void setNumberCatVisualization(java.lang.Integer numberCatVisualization)
numberCatVisualization
- the new number cat visualizationpublic java.util.Vector getCurrentSeries()
public void setCurrentSeries(java.util.Vector currentSeries)
public java.util.HashMap getSeriesNumber()
public void putSeriesNumber(java.lang.String name, int index)
public java.util.Vector getSeriesNames()
public void setSeriesNames(java.util.Vector seriesNames)
public boolean isFilterCatGroups()
public void setFilterCatGroups(boolean filterCatGroups)
public java.util.HashMap getCatGroups()
public void setCatGroups(java.util.HashMap catGroups)
public java.util.Vector getCurrentCatGroups()
public void setCurrentCatGroups(java.util.Vector currentCatGroups)
public java.util.Vector getCatGroupNames()
public void setCatGroupNames(java.util.Vector catGroupNames)
public boolean isFilterSeries()
public void setFilterSeries(boolean filterSeries)
public boolean isFilterCategories()
public void setFilterCategories(boolean filterCategories)
public java.lang.Integer getNumberSerVisualization()
public void setNumberSerVisualization(java.lang.Integer numberSerVisualization)
numberSerVisualization
- the numberSerVisualization to setpublic boolean isDynamicNumberCatVisualization()
public void setDynamicNumberCatVisualization(boolean dynamicNumberCatVisualization)
public boolean isFilterSeriesButtons()
public void setFilterSeriesButtons(boolean filterSeriesButtons)
public java.util.ArrayList<java.lang.String> getSeriesOrder()
public void setSeriesOrder(java.util.ArrayList<java.lang.String> seriesOrder)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |