|
||||||||||
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
it.eng.spagobi.engines.chart.bo.charttypes.boxcharts.SimpleBox
public class SimpleBox
Field Summary |
---|
Fields inherited from class it.eng.spagobi.engines.chart.bo.ChartImpl |
---|
color, confDataset, data, defaultLabelsStyle, filter, height, isLovConfDefined, legend, legendPosition, multichart, name, orientationMultichart, parametersObject, positionSlider, profile, seriesLabelsMap, slider, styleSubTitle, styleTitle, subName, subtype, titleDimension, type, width |
Constructor Summary | |
---|---|
SimpleBox()
|
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 datasetMap)
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. |
Methods inherited from class it.eng.spagobi.engines.chart.bo.charttypes.boxcharts.BoxCharts |
---|
getCategories, getCategoriesNumber, getCategoryLabel, getConfParameters, getNumberCatVisualization, getValueLabel, setCategoriesNumber, setCategoryLabel, setConfParameters, setNumberCatVisualization, setValueLabel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleBox()
Method Detail |
---|
public DatasetMap calculateValue() throws java.lang.Exception
BoxCharts
calculateValue
in interface IChart
calculateValue
in class BoxCharts
java.lang.Exception
- the exceptionpublic void configureChart(it.eng.spago.base.SourceBean content)
BoxCharts
configureChart
in interface IChart
configureChart
in class BoxCharts
content
- the contentpublic org.jfree.chart.JFreeChart createChart(DatasetMap datasetMap)
ChartImpl
createChart
in interface IChart
createChart
in class BoxCharts
datasetMap
- the dataset
public org.jfree.data.general.Dataset filterDataset(org.jfree.data.general.Dataset dataset, java.util.HashMap categories, int catSelected, int numberCatsVisualization)
BoxCharts
filterDataset
in interface IChart
filterDataset
in class BoxCharts
dataset
- the datasetcategories
- the categoriescatSelected
- the cat selectednumberCatsVisualization
- the number cats visualization
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |