Package com.microstrategy.web.objects
Interface WebGraph
-
- All Known Subinterfaces:
WebReportData
public interface WebGraphThis 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 booleangetAutosizeHorizontal()Returns the autosize horizontal propertybooleangetAutosizeVertical()Returns the autosize vertical propertyintgetCategories()Returns the number of graph rows fetched.java.lang.StringgetCoordinateString()byte[]getData()Returns a byte array representing the graph image.voidgetData(IContentConsumer consumer)Obtains graph data from IServer and streams it to the provided content consumerjava.lang.StringgetErrorInGraph()Returns an error number returned when attempting to execute a graph.SimpleListgetGraphAreas()WebGraphPropertiesgetGraphProperties()retrieves graph propertiesWebGraphPropertiesgetGraphProperties(boolean populate)retrieves graph propertiesintgetGraphTotalColumns()Returns the total number of columns in this graph report.intgetGraphTotalRows()Returns the total number of rows in this graph report.intgetGraphTypesAvailable()Returns the available graph types for this particular report.intgetHeight()Returns the graph height in pixels.intgetImageType()Returns the current graph type.booleangetLoadCoordinate()Returns the flag whether the graph need coordinateintgetMajorType()Returns the graph major type.intgetMinorType()Returns the graph minor type.WebResultWindowgetResultWindow()Returns the result window to be used in this report.intgetSeries()Returns the number of graph columns fetched.intgetWidth()Returns the graph width in pixels.booleanisChartAvailable()booleanisLinkedToControl()Indicate whether this graph object linked to any control.voidsaveToDisk(java.lang.String fileName)Saves the current graph file to disk.voidsetAutosizeHorizontal(boolean _asH)Sets the autosize horizontal propertyvoidsetAutosizeVertical(boolean _asV)Sets the autosize vertical propertyvoidsetHeight(int graphHeight)Sets the graph's height.voidsetImageType(int imageType)Specifies the image type to be used for this report.voidsetLoadCoordinate(boolean loadCoordinate)Set whether to request a graph's coordinate from servervoidsetMajorType(int graphMajorType)Sets the graph's major type.voidsetMinorType(int graphMinorType)Sets the graph's minor type.voidsetWidth(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
EnumDSSXMLVAreaMinorTypesEnumDSSXMLHAreaMinorTypesEnumDSSXMLVBarMinorTypesEnumDSSXMLHBarMinorTypesEnumDSSXMLVLineMinorTypesEnumDSSXMLHLineMinorTypesEnumDSSXMLPieMinorTypesEnumDSSXMLScatterMinorTypesEnumDSSXMLPolarMinorTypesEnumDSSXMLRadarMinorTypesEnumDSSXMLBubbleMinorTypesEnumDSSXMLHiloStockMinorTypesEnumDSSXMLHistogramMinorTypesEnumDSSXML3DRiserMinorTypesEnumDSSXML3DFloatMinorTypesEnumDSSXML3DConnGrpMinorTypesEnumDSSXML3DConnSeriesMinorTypesEnumDSSXML3DSurfaceMinorTypesEnumDSSXML3DScatterMinorTypesEnumDSSXMLGanttMinorTypes
- See Also:
setMinorType(int)
-
setHeight
void setHeight(int graphHeight) throws java.lang.IllegalArgumentExceptionSets 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.IllegalArgumentExceptionSet whether to request a graph's coordinate from server- Parameters:
loadCoordinate-- Throws:
java.lang.IllegalArgumentException
-
setWidth
void setWidth(int graphWidth) throws java.lang.IllegalArgumentExceptionSets 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.IllegalArgumentExceptionSets 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.IllegalArgumentExceptionSets the graph's minor type.- Parameters:
graphMinorType- The new minor type fromEnumDSSXMLVAreaMinorTypesEnumDSSXMLHAreaMinorTypesEnumDSSXMLVBarMinorTypesEnumDSSXMLHBarMinorTypesEnumDSSXMLVLineMinorTypesEnumDSSXMLHLineMinorTypesEnumDSSXMLPieMinorTypesEnumDSSXMLScatterMinorTypesEnumDSSXMLPolarMinorTypesEnumDSSXMLRadarMinorTypesEnumDSSXMLBubbleMinorTypesEnumDSSXMLHiloStockMinorTypesEnumDSSXMLHistogramMinorTypesEnumDSSXML3DRiserMinorTypesEnumDSSXML3DFloatMinorTypesEnumDSSXML3DConnGrpMinorTypesEnumDSSXML3DConnSeriesMinorTypesEnumDSSXML3DSurfaceMinorTypesEnumDSSXML3DScatterMinorTypesEnumDSSXMLGanttMinorTypes
- 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
WebResultWindowobject 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 asEnumDSSXMLGraphImgTypesenumeration.- See Also:
getImageType()
-
getData
byte[] getData() throws WebObjectsExceptionReturns 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:
JSONExceptionWebObjectsException
-
saveToDisk
void saveToDisk(java.lang.String fileName) throws WebObjectsExceptionSaves 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
EnumDSSXMLMajorGraphTypesenumeration. - 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 aSimpleListcollection ofWebGraphAreaobjects for this particularWebGraphobject. 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
-
-