Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 2 (11.1.2.1.0)

E17492-02

oracle.dss.sparkChart
Class CommonSparkChart

java.lang.Object
  extended by oracle.dss.sparkChart.CommonSparkChart

public class CommonSparkChart
extends java.lang.Object

The spark chart is a simple, condensed graph that is used to display trends or variations. They are often used within the columns of a table, or displayed in a dashboard to provide additional context to a data-dense display.

Since:
release specific (what release of product did this appear in)

Nested Class Summary
static class CommonSparkChart.Type
          Defines the types of spark charts.
 
Constructor Summary
CommonSparkChart()
          Constructor.
 
Method Summary
 ReferenceArea createReferenceArea()
          Creates and returns a new ReferenceArea.
 ReferenceLine createReferenceLine()
          Creates and returns a new ReferenceLine.
 void destroyReferenceObjects()
          Destroys all reference objects and removes them from the spark chart.
 void exportToPNG(java.io.OutputStream os)
          Exports this spark chart to the OutputStream as a PNG file.
 void exportToSVG(java.io.OutputStream os)
          Exports this spark chart to the OutputStream as an SVG file.
 GraphConstants.AxisScaledFromBaseline getAxisScaledFromBaseline()
          Returns the axis scaling behavior.
 java.awt.Color getBackgroundColor()
           
 java.awt.Color getColor()
          Returns the color of the data items (bars, line, or area).
 java.awt.Color getFirstMarkerColor()
          Returns the Color used to hilight the first data item.
 java.awt.Color getHighMarkerColor()
          Returns the Color used to hilight the data item with the greatest value.
 java.awt.Dimension getImageSize()
           
 java.awt.Color getLastMarkerColor()
          Returns the Color used to hilight the last data item.
 java.awt.Color getLowMarkerColor()
          Returns the Color used to hilight the data item with the smallest value.
 java.util.EnumSet<GraphConstants.Markers> getMarkers()
          Returns the markers to display on this spark chart.
 java.lang.String getNoDataErrorText()
          Returns the text that will be shown when this spark chart has no data.
 java.util.List<ReferenceObject> getReferenceObjects()
          Returns a List of all reference objects belonging to this spark chart.
 Threshold getThreshold()
          Returns the Threshold instance used for customizing thresholds for this spark chart.
 CommonSparkChart.Type getType()
          Returns the type of this spark chart; such as bar, line, or area.
 java.lang.String getXML()
          Returns XML containing attribute settings for this spark chart.
 void setAxisScaledFromBaseline(GraphConstants.AxisScaledFromBaseline value)
          Specifies the axis scaling behavior.
 void setBackgroundColor(java.awt.Color color)
           
 void setColor(java.awt.Color color)
          Specifies the color of the data items (bars, line, or area).
 void setFirstMarkerColor(java.awt.Color color)
          Specifies the Color used to hilight the first data item.
 void setHighMarkerColor(java.awt.Color color)
          Specifies the Color used to hilight the data item with the greatest value.
 void setImageSize(java.awt.Dimension size)
           
 void setLastMarkerColor(java.awt.Color color)
          Specifies the Color used to hilight the last data item.
 void setLowMarkerColor(java.awt.Color color)
          Specifies the Color used to hilight the data item with the smallest value.
 void setMarkers(java.util.EnumSet<GraphConstants.Markers> markers)
          Specifies the markers to display on this spark chart.
 void setNoDataErrorText(java.lang.String text)
          Specifies the text that will be shown when this spark chart has no data.
 void setType(CommonSparkChart.Type type)
          Specifies the type of this spark chart; such as bar, line or area.
 void setValue(java.util.List<SparkItem> data)
          Specifies the data for this spark chart.
 void setXML(java.lang.String xml)
          Applies XML containing attribute settings onto this spark chart.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonSparkChart

public CommonSparkChart()
Constructor.

Method Detail

setValue

public void setValue(java.util.List<SparkItem> data)
Specifies the data for this spark chart. The data provided must match the type of spark chart that is selected. For example, the spark items for a floating bar spark chart must contain float values.

Parameters:
data - the List of SparkItems containing the data for this spark chart

exportToPNG

public void exportToPNG(java.io.OutputStream os)
                 throws java.io.IOException,
                        java.lang.Exception
Exports this spark chart to the OutputStream as a PNG file.

Parameters:
os - the OutputStream where the PNG will be written
Throws:
java.io.IOException - if an error occurs in using the OutputStream
java.lang.Exception - if any other error occurs while exporting to PNG

exportToSVG

public void exportToSVG(java.io.OutputStream os)
                 throws java.io.IOException,
                        java.lang.Exception
Exports this spark chart to the OutputStream as an SVG file.

Parameters:
os - the OutputStream where the SVG will be written
Throws:
java.io.IOException - if an error occurs in using the OutputStream
java.lang.Exception - if any other error occurs while exporting to SVG

getXML

public java.lang.String getXML()
Returns XML containing attribute settings for this spark chart. The syntax of the XML String is considered private and internal, so this method should only be used in conjunction with setXML to save and restore state. This syntax may change in future versions of the code, so XML retrieved from one version of the spark chart should only be used with the same version.

Returns:
a String representing the current attribute settings of the component

setXML

public void setXML(java.lang.String xml)
            throws oracle.dss.util.xml.BIIOException,
                   oracle.dss.util.xml.BISAXException,
                   oracle.dss.util.xml.BIParseException
Applies XML containing attribute settings onto this spark chart. The syntax of the XML String is considered private and internal, so this method should only be used in conjunction with getXML to save and restore state. This syntax may change in future versions of the code, so XML retrieved from one version of the spark chart should only be used with the same version.

Parameters:
xml - a String representing the attribute settings for the component
Throws:
oracle.dss.util.xml.BIIOException
oracle.dss.util.xml.BISAXException
oracle.dss.util.xml.BIParseException

getAxisScaledFromBaseline

public GraphConstants.AxisScaledFromBaseline getAxisScaledFromBaseline()
Returns the axis scaling behavior.

See Also:
GraphConstants.AxisScaledFromBaseline

setAxisScaledFromBaseline

public void setAxisScaledFromBaseline(GraphConstants.AxisScaledFromBaseline value)
Specifies the axis scaling behavior.

See Also:
GraphConstants.AxisScaledFromBaseline

getBackgroundColor

public java.awt.Color getBackgroundColor()

setBackgroundColor

public void setBackgroundColor(java.awt.Color color)

getColor

public java.awt.Color getColor()
Returns the color of the data items (bars, line, or area).


setColor

public void setColor(java.awt.Color color)
Specifies the color of the data items (bars, line, or area).


getImageSize

public java.awt.Dimension getImageSize()

setImageSize

public void setImageSize(java.awt.Dimension size)

getMarkers

public java.util.EnumSet<GraphConstants.Markers> getMarkers()
Returns the markers to display on this spark chart.

See Also:
GraphConstants.Markers

setMarkers

public void setMarkers(java.util.EnumSet<GraphConstants.Markers> markers)
Specifies the markers to display on this spark chart.

See Also:
GraphConstants.Markers

getFirstMarkerColor

public java.awt.Color getFirstMarkerColor()
Returns the Color used to hilight the first data item. The setMarkers method must be called to enable this functionality.

Returns:
the Color used to hilight the first data item.

setFirstMarkerColor

public void setFirstMarkerColor(java.awt.Color color)
Specifies the Color used to hilight the first data item. The setMarkers method must be called to enable this functionality.

Parameters:
color - the Color used to hilight the first data item.

getLastMarkerColor

public java.awt.Color getLastMarkerColor()
Returns the Color used to hilight the last data item. The setMarkers method must be called to enable this functionality.

Returns:
the Color used to hilight the last data item.

setLastMarkerColor

public void setLastMarkerColor(java.awt.Color color)
Specifies the Color used to hilight the last data item. The setMarkers method must be called to enable this functionality.

Parameters:
color - the Color used to hilight the last data item.

getHighMarkerColor

public java.awt.Color getHighMarkerColor()
Returns the Color used to hilight the data item with the greatest value. The setMarkers method must be called to enable this functionality.

Returns:
the Color used to hilight the data item with the greatest value.

setHighMarkerColor

public void setHighMarkerColor(java.awt.Color color)
Specifies the Color used to hilight the data item with the greatest value. The setMarkers method must be called to enable this functionality.

Parameters:
color - the Color used to hilight the data item with the greatest value.

getLowMarkerColor

public java.awt.Color getLowMarkerColor()
Returns the Color used to hilight the data item with the smallest value. The setMarkers method must be called to enable this functionality.

Returns:
the Color used to hilight the data item with the smallest value.

setLowMarkerColor

public void setLowMarkerColor(java.awt.Color color)
Specifies the Color used to hilight the data item with the smallest value. The setMarkers method must be called to enable this functionality.

Parameters:
color - the Color used to hilight the data item with the smallest value.

getNoDataErrorText

public java.lang.String getNoDataErrorText()
Returns the text that will be shown when this spark chart has no data.

Returns:

setNoDataErrorText

public void setNoDataErrorText(java.lang.String text)
Specifies the text that will be shown when this spark chart has no data.


getType

public CommonSparkChart.Type getType()
Returns the type of this spark chart; such as bar, line, or area.

See Also:
CommonSparkChart.Type

setType

public void setType(CommonSparkChart.Type type)
Specifies the type of this spark chart; such as bar, line or area.

See Also:
CommonSparkChart.Type

createReferenceArea

public ReferenceArea createReferenceArea()
Creates and returns a new ReferenceArea. Use reference areas to denote special ranges of values.

Returns:
a ReferenceArea instance used to denote important ranges of values

createReferenceLine

public ReferenceLine createReferenceLine()
Creates and returns a new ReferenceLine. Use reference areas to denote an important axis value.

Returns:
a ReferenceLine instance used to denote an important axis value

destroyReferenceObjects

public void destroyReferenceObjects()
Destroys all reference objects and removes them from the spark chart.


getReferenceObjects

public java.util.List<ReferenceObject> getReferenceObjects()
Returns a List of all reference objects belonging to this spark chart.


getThreshold

public Threshold getThreshold()
Returns the Threshold instance used for customizing thresholds for this spark chart.

Returns:

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 2 (11.1.2.1.0)

E17492-02

Copyright © 1997, 2011, Oracle. All rights reserved.