com.jinsight.jetchart
Class BubbleSerie

java.lang.Object
  |
  +--com.jinsight.jetchart.AbstractSerie
        |
        +--com.jinsight.jetchart.ScatterSerie
              |
              +--com.jinsight.jetchart.BubbleSerie

public class BubbleSerie
extends ScatterSerie

This class implements the properties and methods of bubble series. A bubble series is a scatter series that displays circles centered on the xy coordinates. Each circle is associated with three values. Two of them are used to calculate the xy coordinates and the third one determines the diameter of the circle.

See Also:
ScatterSerie

Field Summary
static int ALL_SERIES
          Constant used to set the scope of the calculation of the maximum z value to all bubble series instances.
static int SERIES
          Constant used to set the scope of the calculation of the maximum z value to a bubble series instance.
 
Fields inherited from class com.jinsight.jetchart.AbstractSerie
CLIENT_SIDE, SERVER_SIDE_CERN, SERVER_SIDE_NCSA
 
Constructor Summary
BubbleSerie()
          Creates a BubbleSerie object.
BubbleSerie(double[][] multipleValues)
          Creates a BubbleSerie object.
BubbleSerie(double[][] multipleValues, java.lang.String title)
          Creates a BubbleSerie object.
 
Method Summary
 java.lang.String getSerieMap(java.lang.String[] urls, int type, java.lang.String target)
          Creates a chart image map.
 void setBorderColor(java.awt.Color borderColor)
          Sets the color of the bubble border.
 void setBorderEnabled(boolean isBorderEnabled)
          Enables/disables a border around the bubble.
 void setBorderThickness(int borderThickness)
          Sets the thickness of the bubble border.
 void setCenterPointColor(java.awt.Color centerPointColor)
          Sets the color of the center point.
 void setCenterPointEnabled(boolean isCenterPointEnabled)
          Enables/disables the center point.
 void setMaxDiameter(int maxDiameter)
          Sets the largest diameter of a bubble series.
static void setMaxZValueScope(int maxZValueScope)
          Sets the scope of the calculation of the maximum z value.
 void setOpacityEnabled(boolean isOpacityEnabled)
          Enables/disables bubble opacity.
 
Methods inherited from class com.jinsight.jetchart.ScatterSerie
finalize, getColor, getRegressionLine, removeRegressionLine, setColor, setMultipleValues, setTitle, setToolTipText, setValuesFormat
 
Methods inherited from class com.jinsight.jetchart.AbstractSerie
getId, getMultipleValues, getValues, setHighlightColor, setHighlightEnabled, setId, setLegendEnabled, setMultipleValues, setSVGURLs, setToolTipContent, setToolTipEnabled, setValueFormat, setValues, setValues, setValuesQuery
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERIES

public static final int SERIES
Constant used to set the scope of the calculation of the maximum z value to a bubble series instance.
See Also:
setMaxZValueScope(int)

ALL_SERIES

public static final int ALL_SERIES
Constant used to set the scope of the calculation of the maximum z value to all bubble series instances.
See Also:
setMaxZValueScope(int)
Constructor Detail

BubbleSerie

public BubbleSerie()
Creates a BubbleSerie object. Default constructor.

BubbleSerie

public BubbleSerie(double[][] multipleValues)
Creates a BubbleSerie object. This constructor takes a bidimensional array of double values. Each subarray must contain three values corresponding to the x,y and z values.
Parameters:
multipleValues - Bidimensional array of double precision numbers.

BubbleSerie

public BubbleSerie(double[][] multipleValues,
                   java.lang.String title)
Creates a BubbleSerie object. This constructor takes a bidimensional array of double values and the series title. Each subarray must contain three values corresponding to the x,y and z values.
Parameters:
multipleValues - Array of double precision numbers.
title - A String object. The series title is displayed inside the legend box.
Method Detail

setMaxDiameter

public void setMaxDiameter(int maxDiameter)
Sets the largest diameter of a bubble series. The largest diameter is assigned to the data point with the maximum z value. All the other data points have their diameters calculated with respect to the largest diameter. The scope in which the diameters are calculated is delimited by the range of data points belonging to a bubble series object.

If not informed the largest diameter defaults to 50 pixels.

Parameters:
maxDiameter - An integer value.
See Also:
setMaxZValueScope(int)

setMaxZValueScope

public static void setMaxZValueScope(int maxZValueScope)
Sets the scope of the calculation of the maximum z value. If the scope is set to ALL_SERIES, the maximum z value is picked out of the z values of all bubble series added to the chart context. The diameter of the bubbles of all bubble series are calculated against this common maximum z value. If the scope is set to SERIES, the maximum z value calculation remains within the scope of a BubbleSerie instance. Default value is SERIES.
The largest diameter is an instance property, so, if the scope is set to ALL_SERIES, the largest diameter is the maximum largest diameter of all bubble series.
Parameters:
maxZValueScope - An integer value.
See Also:
ALL_SERIES, SERIES, setMaxDiameter(int)

setBorderEnabled

public void setBorderEnabled(boolean isBorderEnabled)
Enables/disables a border around the bubble. Default value is false.
Parameters:
isBorderEnabled - A boolean value.
See Also:
setBorderColor(java.awt.Color), setBorderThickness(int)

setBorderColor

public void setBorderColor(java.awt.Color borderColor)
Sets the color of the bubble border. Default color is black.
Parameters:
borderColor - A Color object.
See Also:
setBorderEnabled(boolean), setBorderThickness(int)

setBorderThickness

public void setBorderThickness(int borderThickness)
Sets the thickness of the bubble border. Default value is 1.
Parameters:
borderThickness - An integer value.
See Also:
setBorderEnabled(boolean), setBorderColor(java.awt.Color)

setOpacityEnabled

public void setOpacityEnabled(boolean isOpacityEnabled)
Enables/disables bubble opacity. If bubble is transparent the border thickness is always 1 pixel and painted in the color assigned to the series.
Parameters:
isOpacityEnabled - A boolean value.
See Also:
setBorderThickness(int)

setCenterPointEnabled

public void setCenterPointEnabled(boolean isCenterPointEnabled)
Enables/disables the center point. The center point is disabled by default.
Parameters:
isCenterPointEnabled - A boolean value.
See Also:
setCenterPointColor(java.awt.Color)

setCenterPointColor

public void setCenterPointColor(java.awt.Color centerPointColor)
Sets the color of the center point. Default color is black.
Parameters:
centerPointColor - A Color object.
See Also:
setCenterPointEnabled(boolean)

getSerieMap

public java.lang.String getSerieMap(java.lang.String[] urls,
                                    int type,
                                    java.lang.String target)
Description copied from class: AbstractSerie
Creates a chart image map. A image map is used in an HTML document to allow regions of an image to be linked to other HTML documents. The web browser will bring up a different document depending where on the image map the user clicks. The map itself is either a separate file (server-side maps) or part of the HTML document (client-side maps).
A client-side map can be inserted into html text to be returned by a servlet that also generates the chart image.
If the 'urls' parameter is informed, data points coordinates are associated with each element found in the array of urls. If hyperlinks are not required set the 'urls' parameter to null.
The second parameter sets the map format type. Image map can be generated in three different formats. A client-side map and an NCSA server or CERN server formatted map. The client-side map is the most used format.
The third parameter sets a target. The target is the name of an html frame used to display the page associated with the image map. This parameter is only related to client-side image mapping. If a target frame is not required set the 'target' parameter to null.
Overrides:
getSerieMap in class ScatterSerie
Following copied from class: com.jinsight.jetchart.AbstractSerie
Parameters:
urls - An array of strings containing valid urls.
type - An integer representing the format type.
target - A string object.
See Also:
AbstractSerie.CLIENT_SIDE, AbstractSerie.SERVER_SIDE_NCSA, AbstractSerie.SERVER_SIDE_CERN