com.fusioncharts
Class FusionGraph

java.lang.Object
  extended by com.fusioncharts.Graph
      extended by com.fusioncharts.FusionGraph
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<Graph>

public class FusionGraph
extends Graph

The FusionGraph class extends the Graph class and provides the necessary members in order to generate FusionChart related properties. The graph properties will be inserted in HashMap related groups. For example anything that's related to the chart's cosmetics (bgcolor, caption, xaxis label), would be inserted into the chartProperties Hashmap. 20090323 - First created by David Lai

Author:
David Lai

Nested Class Summary
static class FusionGraph.FusionStyle
          FusionStyle is a subclass that is used to define styles for the Graph object.
static class FusionGraph.FusionStyleObject
           
static class FusionGraph.FusionStyleType
           
 
Constructor Summary
FusionGraph(java.lang.String graphId, ChartType graphType, int length, javax.servlet.http.HttpServletRequest request)
          Constructor for a FusionGraph object.
 
Method Summary
 java.util.Map<java.lang.String,java.lang.String> getCategoriesProperties()
          Getter method to get the Categories Properties.
 java.util.Map<java.lang.String,java.lang.String> getCategoryProperties()
          Getter method to get the Category Properties.
 java.util.Map<java.lang.String,java.lang.String> getChartProperties()
          Getter method to get the Chart Properties.
 java.util.Map<java.lang.String,java.lang.String> getDatasetProperties()
          Getter method to get the Dataset Properties.
 java.util.Map<FusionGraph.FusionStyleObject,java.util.List<java.lang.String>> getFusionStyleObjects()
          Getter method to get the Fusion Styles.
 java.util.Map<java.lang.String,FusionGraph.FusionStyle> getFusionStyles()
          Getter method to get the Fusion Styles.
 void insertFusionStyleObject(FusionGraph.FusionStyleObject fusionStyleObject, java.lang.String fusionStyleName)
          Insert method to attach styles to a style object
 void setCategoriesProperties(java.util.HashMap<java.lang.String,java.lang.String> categoriesProperties)
          Setter method to set the Categories Properties
 void setCategoryProperties(java.util.HashMap<java.lang.String,java.lang.String> categoryProperties)
          Setter method to set the Category Properties
 void setChartProperties(java.lang.String key, java.lang.String value)
          Setter method to set the Chart Properties
 void setDatasetProperties(java.util.HashMap<java.lang.String,java.lang.String> datasetProperties)
          Setter method to set the Dataset Properties
 void setFusionStyles(java.lang.String styleName, FusionGraph.FusionStyle fusionStyle)
          Setter method to set the Fusion Styles Map
 
Methods inherited from class com.fusioncharts.Graph
calculateMax, calculateMin, clear, clone, compareTo, createSeries, createSeries, equals, getCategory, getGraphId, getGraphType, getHeight, getMaxScale, getMinScale, getNonTrendLineSeries, getNumberOfCategories, getNumberOfSeries, getSeries, getTrendLineSeries, getWidth, hashCode, setCategory, setCategory, setHeight, setWidth
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FusionGraph

public FusionGraph(java.lang.String graphId,
                   ChartType graphType,
                   int length,
                   javax.servlet.http.HttpServletRequest request)
            throws java.lang.IllegalArgumentException
Constructor for a FusionGraph object.

Parameters:
graphId - The graph name.
graphType - The graph type ie:(pie graph, column chart)
length - The length of the categories.
request - The user request. HTTP request header fields allow the client to pass additional information about the request, and about the client itself, to the server. These fields also act as request modifiers by the responding script. For additional information on HTTP Headers, consult the W3C RFC2616.
Throws:
java.lang.IllegalArgumentException - If the graph object name is blank or length is less than or equal to zero.
Method Detail

getChartProperties

public java.util.Map<java.lang.String,java.lang.String> getChartProperties()
Getter method to get the Chart Properties.

Returns:
chartProperties Map of the Chart Properties

setChartProperties

public void setChartProperties(java.lang.String key,
                               java.lang.String value)
Setter method to set the Chart Properties

Parameters:
key - Key of the attribute to insert into the Chart Properties
value - Value of the attribute to insert into the Chart Properties

getCategoriesProperties

public java.util.Map<java.lang.String,java.lang.String> getCategoriesProperties()
Getter method to get the Categories Properties.

Returns:
categoriesProperties Categories Properties

setCategoriesProperties

public void setCategoriesProperties(java.util.HashMap<java.lang.String,java.lang.String> categoriesProperties)
Setter method to set the Categories Properties

Parameters:
HashMap - Key value pair of the Categories attribute to be set.

getCategoryProperties

public java.util.Map<java.lang.String,java.lang.String> getCategoryProperties()
Getter method to get the Category Properties.

Returns:
HashMap Category Properties

setCategoryProperties

public void setCategoryProperties(java.util.HashMap<java.lang.String,java.lang.String> categoryProperties)
Setter method to set the Category Properties

Parameters:
HashMap - Key value pair of the Category attribute to be set.

getDatasetProperties

public java.util.Map<java.lang.String,java.lang.String> getDatasetProperties()
Getter method to get the Dataset Properties.

Returns:
HashMap Dataset Properties

setDatasetProperties

public void setDatasetProperties(java.util.HashMap<java.lang.String,java.lang.String> datasetProperties)
Setter method to set the Dataset Properties

Parameters:
HashMap - Key value pair of the Dataset attribute to be set.

getFusionStyles

public java.util.Map<java.lang.String,FusionGraph.FusionStyle> getFusionStyles()
Getter method to get the Fusion Styles.

Returns:
fusionStyles Map of the Fusion Styles

setFusionStyles

public void setFusionStyles(java.lang.String styleName,
                            FusionGraph.FusionStyle fusionStyle)
Setter method to set the Fusion Styles Map

Parameters:
styleName - Style name of the fusion style to insert into the Fusion Styles Map
fusionStyle - The Fusion Style to insert into the Fusion Styles Map

getFusionStyleObjects

public java.util.Map<FusionGraph.FusionStyleObject,java.util.List<java.lang.String>> getFusionStyleObjects()
Getter method to get the Fusion Styles.

Returns:
fusionStyles Map of the Fusion Styles

insertFusionStyleObject

public void insertFusionStyleObject(FusionGraph.FusionStyleObject fusionStyleObject,
                                    java.lang.String fusionStyleName)
                             throws java.lang.IllegalArgumentException
Insert method to attach styles to a style object

Parameters:
fusionStyleObject - The object that the style will be added to
fusionStyle - The Fusion Style to insert into the Fusion Styles Map
Throws:
java.lang.IllegalArgumentException