Package com.microstrategy.web.objects
Interface WebGraph
-
- All Known Subinterfaces:
WebReportData
public interface WebGraph
This object allows a user to manipulate and load a graph data stream.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
getAutosizeHorizontal()
Returns the autosize horizontal propertyboolean
getAutosizeVertical()
Returns the autosize vertical propertyint
getCategories()
Returns the number of graph rows fetched.java.lang.String
getCoordinateString()
byte[]
getData()
Returns a byte array representing the graph image.void
getData(IContentConsumer consumer)
Obtains graph data from IServer and streams it to the provided content consumerjava.lang.String
getErrorInGraph()
Returns an error number returned when attempting to execute a graph.SimpleList
getGraphAreas()
WebGraphProperties
getGraphProperties()
retrieves graph propertiesWebGraphProperties
getGraphProperties(boolean populate)
retrieves graph propertiesint
getGraphTotalColumns()
Returns the total number of columns in this graph report.int
getGraphTotalRows()
Returns the total number of rows in this graph report.int
getGraphTypesAvailable()
Returns the available graph types for this particular report.int
getHeight()
Returns the graph height in pixels.int
getImageType()
Returns the current graph type.boolean
getLoadCoordinate()
Returns the flag whether the graph need coordinateint
getMajorType()
Returns the graph major type.int
getMinorType()
Returns the graph minor type.WebResultWindow
getResultWindow()
Returns the result window to be used in this report.int
getSeries()
Returns the number of graph columns fetched.int
getWidth()
Returns the graph width in pixels.boolean
isChartAvailable()
boolean
isLinkedToControl()
Indicate whether this graph object linked to any control.void
saveToDisk(java.lang.String fileName)
Saves the current graph file to disk.void
setAutosizeHorizontal(boolean _asH)
Sets the autosize horizontal propertyvoid
setAutosizeVertical(boolean _asV)
Sets the autosize vertical propertyvoid
setHeight(int graphHeight)
Sets the graph's height.void
setImageType(int imageType)
Specifies the image type to be used for this report.void
setLoadCoordinate(boolean loadCoordinate)
Set whether to request a graph's coordinate from servervoid
setMajorType(int graphMajorType)
Sets the graph's major type.void
setMinorType(int graphMinorType)
Sets the graph's minor type.void
setWidth(int graphWidth)
Sets the graph's width.
-
-
-
Method Detail
-
getHeight
int getHeight()
Returns the graph height in pixels.- Returns:
- The graph height.
- See Also:
setHeight(int)
-
getLoadCoordinate
boolean getLoadCoordinate()
Returns the flag whether the graph need coordinate- Returns:
- a boolean whether coordinate is needed for a graph
-
getWidth
int getWidth()
Returns the graph width in pixels.- Returns:
- The graph width.
- See Also:
setWidth(int)
-
getMajorType
int getMajorType()
Returns the graph major type.- Returns:
- The graph major type, from
EnumDSSXMLMajorGraphTypes
. - See Also:
setMajorType(int)
-
getMinorType
int getMinorType()
Returns the graph minor type.- Returns:
- the graph minor type, from
EnumDSSXMLVAreaMinorTypes
EnumDSSXMLHAreaMinorTypes
EnumDSSXMLVBarMinorTypes
EnumDSSXMLHBarMinorTypes
EnumDSSXMLVLineMinorTypes
EnumDSSXMLHLineMinorTypes
EnumDSSXMLPieMinorTypes
EnumDSSXMLScatterMinorTypes
EnumDSSXMLPolarMinorTypes
EnumDSSXMLRadarMinorTypes
EnumDSSXMLBubbleMinorTypes
EnumDSSXMLHiloStockMinorTypes
EnumDSSXMLHistogramMinorTypes
EnumDSSXML3DRiserMinorTypes
EnumDSSXML3DFloatMinorTypes
EnumDSSXML3DConnGrpMinorTypes
EnumDSSXML3DConnSeriesMinorTypes
EnumDSSXML3DSurfaceMinorTypes
EnumDSSXML3DScatterMinorTypes
EnumDSSXMLGanttMinorTypes
- See Also:
setMinorType(int)
-
setHeight
void setHeight(int graphHeight) throws java.lang.IllegalArgumentException
Sets the graph's height.- Parameters:
graphHeight
- The new graph's height in pixels.- Throws:
java.lang.IllegalArgumentException
- Thrown if trying to set a height less than or equal to zero.- See Also:
getHeight()
-
setLoadCoordinate
void setLoadCoordinate(boolean loadCoordinate) throws java.lang.IllegalArgumentException
Set whether to request a graph's coordinate from server- Parameters:
loadCoordinate
-- Throws:
java.lang.IllegalArgumentException
-
setWidth
void setWidth(int graphWidth) throws java.lang.IllegalArgumentException
Sets the graph's width.- Parameters:
graphWidth
- The new graph's width in pixels.- Throws:
java.lang.IllegalArgumentException
- Thrown if trying to set a width less than or equal to zero.- See Also:
getWidth()
-
setMajorType
void setMajorType(int graphMajorType) throws java.lang.IllegalArgumentException
Sets the graph's major type.- Parameters:
graphMajorType
- The new major type, fromEnumDSSXMLMajorGraphTypes
.- Throws:
java.lang.IllegalArgumentException
- Thrown if trying to set a major type less than or equal to zero.- See Also:
getMajorType()
-
setMinorType
void setMinorType(int graphMinorType) throws java.lang.IllegalArgumentException
Sets the graph's minor type.- Parameters:
graphMinorType
- The new minor type fromEnumDSSXMLVAreaMinorTypes
EnumDSSXMLHAreaMinorTypes
EnumDSSXMLVBarMinorTypes
EnumDSSXMLHBarMinorTypes
EnumDSSXMLVLineMinorTypes
EnumDSSXMLHLineMinorTypes
EnumDSSXMLPieMinorTypes
EnumDSSXMLScatterMinorTypes
EnumDSSXMLPolarMinorTypes
EnumDSSXMLRadarMinorTypes
EnumDSSXMLBubbleMinorTypes
EnumDSSXMLHiloStockMinorTypes
EnumDSSXMLHistogramMinorTypes
EnumDSSXML3DRiserMinorTypes
EnumDSSXML3DFloatMinorTypes
EnumDSSXML3DConnGrpMinorTypes
EnumDSSXML3DConnSeriesMinorTypes
EnumDSSXML3DSurfaceMinorTypes
EnumDSSXML3DScatterMinorTypes
EnumDSSXMLGanttMinorTypes
- Throws:
java.lang.IllegalArgumentException
- Thrown if trying to set a minor type less than or equal to zero.- See Also:
getMinorType()
-
getResultWindow
WebResultWindow getResultWindow()
Returns the result window to be used in this report.- Returns:
- The
WebResultWindow
object associated with this report.
-
getImageType
int getImageType()
Returns the current graph type.The default graph image type is
EnumDSSXMLGraphImgTypes.DssXmlGraphImgGIF
- Returns:
- A value of enumeration type
EnumDSSXMLGraphImgTypes
- See Also:
setImageType(int)
-
setImageType
void setImageType(int imageType)
Specifies the image type to be used for this report.- Parameters:
imageType
- Image type defined asEnumDSSXMLGraphImgTypes
enumeration.- See Also:
getImageType()
-
getData
byte[] getData() throws WebObjectsException
Returns a byte array representing the graph image. This method applies the following properties: sessionID, messageID, windowSettings, stateID, graphImageType and graphProperty.- Returns:
- A byte array of the graph image.
- Throws:
WebObjectsException
- Thrown if the graph cannot be loaded.
-
getCoordinateString
java.lang.String getCoordinateString() throws JSONException, WebObjectsException
- Throws:
JSONException
WebObjectsException
-
saveToDisk
void saveToDisk(java.lang.String fileName) throws WebObjectsException
Saves the current graph file to disk. This method applies the following properties: sessionID, messageID, windowSettings, stateID, graphImageType and graphProperty.- Parameters:
fileName
- File name of the graph file to be produced; with a path if specified.- Throws:
WebObjectsException
- Thrown if the graph cannot be created and saved.
-
getErrorInGraph
java.lang.String getErrorInGraph()
Returns an error number returned when attempting to execute a graph.Returned from XSL pattern search: "/mi/rit/vw/vws/gpp/@en".
- Returns:
- A string value of the error number.
- Since:
- MicroStrategy Web 8.0.0
-
getGraphTotalColumns
int getGraphTotalColumns()
Returns the total number of columns in this graph report.Returned from XSL search pattern: "/mi/rit/vw/vws/gpp/@tc".
- Returns:
- The total number of columns in this report.
- Since:
- MicroStrategy Web 8.0.0
-
getGraphTotalRows
int getGraphTotalRows()
Returns the total number of rows in this graph report.Returned from XSL search pattern: "/mi/rit/vw/vws/gpp/@tr".
- Returns:
- The total number of rows in this report.
- Since:
- MicroStrategy Web 8.0.0
-
getGraphTypesAvailable
int getGraphTypesAvailable()
Returns the available graph types for this particular report.Returned from XSL search pattern: "/mi/rit/vw/vws/gpp/@gta".
- Returns:
- The graph types available represented as a bit-wise OR of the
EnumDSSXMLMajorGraphTypes
enumeration. - Since:
- MicroStrategy Web 8.0.0
-
getGraphProperties
WebGraphProperties getGraphProperties() throws WebObjectsException
retrieves graph properties- Returns:
- the graph properties. The properties would be populated if data has already been collected Otherwise, an empty collection is returned
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 8.0.0
-
getGraphProperties
WebGraphProperties getGraphProperties(boolean populate) throws WebObjectsException
retrieves graph properties- Parameters:
populate
- when set to true all graph properties are loaded.- Returns:
- the graph properties. The properties would be populated if data has already been collected Otherwise, an empty collection is returned
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 8.0.0
-
isChartAvailable
boolean isChartAvailable()
- Since:
- MicroStrategy Web 8.0.0
-
getCategories
int getCategories()
Returns the number of graph rows fetched.- Returns:
- the number of graph rows fetched.
- Since:
- MicroStrategy Web 8.0.0
-
getSeries
int getSeries()
Returns the number of graph columns fetched.- Returns:
- the number of graph columns fetched.
- Since:
- MicroStrategy Web 8.0.0
-
getAutosizeHorizontal
boolean getAutosizeHorizontal()
Returns the autosize horizontal property- Returns:
- the autosize horizontal property
- Since:
- MicroStrategy Web 8.0.0
-
getAutosizeVertical
boolean getAutosizeVertical()
Returns the autosize vertical property- Returns:
- the autosize vertical property
- Since:
- MicroStrategy Web 8.0.0
-
setAutosizeHorizontal
void setAutosizeHorizontal(boolean _asH)
Sets the autosize horizontal property- Since:
- MicroStrategy Web 8.0.0
-
setAutosizeVertical
void setAutosizeVertical(boolean _asV)
Sets the autosize vertical property- Since:
- MicroStrategy Web 8.0.0
-
getGraphAreas
SimpleList getGraphAreas() throws WebObjectsException
Returns aSimpleList
collection ofWebGraphArea
objects for this particularWebGraph
object. Each WebGraphArea object represents an 'area' on the graph image with certain properties, and represents the underlying graph object.- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 8.1.0
-
getData
void getData(IContentConsumer consumer) throws WebObjectsException
Obtains graph data from IServer and streams it to the provided content consumer- Parameters:
consumer
- Content consumer- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 9.0.1
-
isLinkedToControl
boolean isLinkedToControl()
Indicate whether this graph object linked to any control.- Since:
- MicroStrategy Web 9.0.1
-
-