|
||||||||||
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.boxcharts.BoxCharts
public class BoxCharts
Field Summary |
---|
Constructor Summary | |
---|---|
BoxCharts()
|
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. |
java.util.Map |
getCategories()
Gets the categories. |
int |
getCategoriesNumber()
Gets the categories number. |
java.lang.String |
getCategoryLabel()
Gets the category label. |
java.util.Map |
getConfParameters()
Gets the conf parameters. |
java.lang.Integer |
getNumberCatVisualization()
Gets the number cat visualization. |
java.lang.String |
getValueLabel()
Gets the value label. |
void |
setCategoriesNumber(int categoriesNumber)
Sets the categories number. |
void |
setCategoryLabel(java.lang.String categoryLabel)
Sets the category label. |
void |
setConfParameters(java.util.Map confParameters)
Sets the conf parameters. |
void |
setNumberCatVisualization(java.lang.Integer numberCatVisualization)
Sets the number cat visualization. |
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 |
Constructor Detail |
---|
public BoxCharts()
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 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 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 visualization
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |