OverviewSingleDeprecated

jsx3.chart

class Chart

Object
->jsx3.lang.Object
  ->jsx3.app.Model
    ->jsx3.gui.Painted
      ->jsx3.gui.Block
        ->jsx3.vector.Block
          ->jsx3.chart.Chart

All Implemented Interfaces:

jsx3.gui.Interactive, jsx3.util.EventDispatcher, jsx3.xml.CDF, jsx3.xml.Cacheable

Direct Known Subclasses:

jsx3.chart.CartesianChart, jsx3.chart.RadialChart

class Chart
extends jsx3.vector.Block
The base class for all charts in this package. Encapsulates common functionality shared by all charts.

In general, a chart is responsible for managing its children components and handling any coordination between them. A chart always manages the layout of its children.

All charts can have the following children:

Field Summary
static Array<jsx3.vector.Fill>
DEFAULT_FILLS
The default fill colors for series and categories whose fills are not specified.
Constructor Summary
void
init(name : String, left : int, top : int, width : int, height : int)
The instance initializer.
Method Summary
float
Returns the alpha field, the opacity to render the chart's background.
float
Returns the borderAlpha field, the opacity to render the chart's border.
String | Number
Returns the borderColor field, the RGB color to render the chart's border.
int
Returns the borderWidth field, the pixel width of the chart's border.
jsx3.chart.ChartLabel
Find the first jsx3.chart.ChartLabel child
String
Returns the dataPadding field, the CSS padding value that determines the padding around the data area, ie "10" or "5 0 5 0".
jsx3.chart.Legend
Find the first Legend child
int
in general the chart legend renders one entry for every series in the chart, override this method to show categories in the legend
String
Returns the legendPlacement field, the quadrant in which to place the legend.
Array<jsx3.chart.Series>
Returns the list of Series children.
int
Returns the index of a series in the list of series children.
String
Returns the titlePlacement field, the quadrant in which to place the title.
static String
Deprecated.
void
Note that this method is very expensive because it causes the entire chart to be redrawn.
void
setAlpha(alpha : float)
Sets the alpha field.
void
setBorderAlpha(borderAlpha : float)
Sets the borderAlpha field.
void
setBorderColor(borderColor : String | Number)
Sets the borderColor field.
void
setBorderWidth(borderWidth : int)
Sets the borderWidth field.
void
setDataPadding(dataPadding : String)
Sets the dataPadding field.
void
setLegendPlacement(legendPlacement : String)
Sets the legendPlacement field.
void
setTitlePlacement(titlePlacement : String)
Sets the titlePlacement field.
Methods Inherited From jsx3.xml.Cacheable
clearXmlData, getNodeSet, getShareResources, getXML, getXMLId, getXMLString, getXMLTransformers, getXMLURL, getXSL, getXSLId, getXSLParams, getXSLString, getXSLURL, getXmlAsync, getXmlBind, onXmlBinding, removeXSLParam, removeXSLParams, resetCacheData, resetData, resetXmlCacheData, resetXslCacheData, setNodeSet, setShareResources, setSourceXML, setXMLId, setXMLString, setXMLTransformers, setXMLURL, setXSLId, setXSLParam, setXSLString, setXSLURL, setXmlAsync, setXmlBind
Methods Inherited From jsx3.xml.CDF
adoptRecord, adoptRecordBefore, convertProperties, deleteRecord, deleteRecordProperty, getRecord, getRecordNode, insertRecord, insertRecordBefore, insertRecordNode, insertRecordProperty, reloadFromSource
Methods Inherited From jsx3.vector.Block
createCanvas, createVector, getCanvas, paintEventHandler, updateVector
Methods Inherited From jsx3.gui.Block
getBackground, getBackgroundColor, getBorder, getCSSOverride, getClassName, getColor, getCursor, getDimensions, getDisplay, getFontName, getFontSize, getFontWeight, getHeight, getIndex, getLeft, getMargin, getOverflow, getPadding, getRelativePosition, getTagName, getText, getTextAlign, getTip, getTop, getVisibility, getWidth, getZIndex, hideMask, paint, setBackground, setBackgroundColor, setBorder, setCSSOverride, setClassName, setColor, setCursor, setDimensions, setDisplay, setFontName, setFontSize, setFontWeight, setHeight, setIndex, setLeft, setMargin, setOverflow, setPadding, setRelativePosition, setTagName, setText, setTextAlign, setTip, setTop, setVisibility, setWidth, setZIndex, showMask
Methods Inherited From jsx3.gui.Interactive
doEvent, getCanDrag, getCanDrop, getCanMove, getCanSpy, getEvent, getEvents, getMenu, hasEvent, registerHotKey, removeEvent, removeEvents, setCanDrag, setCanDrop, setCanMove, setCanSpy, setEvent, setMenu, setSpyStyles, showSpy
Methods Inherited From jsx3.gui.Painted
focus, getAbsolutePosition, getAttribute, getAttributes, getDynamicProperty, getRendered, insertHTML, onAfterPaint, paintChild, paintChildren, recalcBox, removeAttribute, removeAttributes, repaint, setAttribute, setDynamicProperty
Methods Inherited From jsx3.app.Model
adoptChild, doClone, findAncestor, findDescendants, getAncestorOfName, getAncestorOfType, getChild, getChildIndex, getChildren, getDescendantOfName, getDescendantsOfType, getFirstChild, getFirstChildOfType, getHelpId, getId, getLastChild, getLoadType, getMetaValue, getNS, getName, getNextSibling, getParent, getPersistence, getPreviousSibling, getServer, getUriResolver, insertBefore, load, loadAndCache, loadXML, onAfterAssemble, onAfterAttach, onBeforeAssemble, onChangeServer, onDestroy, onRemoveChild, onSetChild, onSetParent, removeChild, removeChildren, setChild, setHelpId, setLoadType, setMetaValue, setName, setPersistence, toString, toXML, toXMLDoc
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf
Field Detail

DEFAULT_FILLS

static Array<jsx3.vector.Fill> DEFAULT_FILLS
The default fill colors for series and categories whose fills are not specified.
Constructor Detail

init

void init(name : String, left : int, top : int, width : int, height : int)
The instance initializer.

Parameters:

namethe GI name of the instance
leftleft position (in pixels) of the chart relative to its parent container
toptop position (in pixels) of the chart relative to its parent container
widthwidth (in pixels) of the chart
heightheight (in pixels) of the chart
Method Detail

getAlpha

float getAlpha()
Returns the alpha field, the opacity to render the chart's background.

Returns:

alpha  

getBorderAlpha

float getBorderAlpha()
Returns the borderAlpha field, the opacity to render the chart's border.

Returns:

borderAlpha  

getBorderColor

String | Number getBorderColor()
Returns the borderColor field, the RGB color to render the chart's border.

Returns:

borderColor  

getBorderWidth

int getBorderWidth()
Returns the borderWidth field, the pixel width of the chart's border.

Returns:

borderWidth  

getChartTitle

jsx3.chart.ChartLabel getChartTitle()
Find the first jsx3.chart.ChartLabel child

Returns:

 

getDataPadding

String getDataPadding()
Returns the dataPadding field, the CSS padding value that determines the padding around the data area, ie "10" or "5 0 5 0".

Returns:

dataPadding  

getLegend

jsx3.chart.Legend getLegend()
Find the first Legend child

Returns:

 

getLegendEntryType

int getLegendEntryType()
in general the chart legend renders one entry for every series in the chart, override this method to show categories in the legend

Returns:

jsx3.chart.Legend.SHOW_SERIES  

getLegendPlacement

String getLegendPlacement()
Returns the legendPlacement field, the quadrant in which to place the legend.

Returns:

legendPlacement, one of {'top','right','bottom','left'}  

getSeries

Array<jsx3.chart.Series> getSeries()
Returns the list of Series children.

Returns:

 

getSeriesIndex

int getSeriesIndex(s : jsx3.chart.Series)
Returns the index of a series in the list of series children.

Parameters:

s

Returns:

the index or -1 if not found  

getTitlePlacement

String getTitlePlacement()
Returns the titlePlacement field, the quadrant in which to place the title.

Returns:

titlePlacement, one of {'top','right','bottom','left'}  

getVersion

static String getVersion()
Deprecated.
Returns the release/build for the class (i.e., "2.2.00").

Returns:

 

redrawRecord

void redrawRecord()
Note that this method is very expensive because it causes the entire chart to be redrawn. It is recommended that the methods in the CDF interface which cause this method to be called, be passed bRedraw=false to prevent this method from being called.

Overrides:

redrawRecord in jsx3.xml.CDF

setAlpha

void setAlpha(alpha : float)
Sets the alpha field.

Parameters:

alphathe new value for alpha

setBorderAlpha

void setBorderAlpha(borderAlpha : float)
Sets the borderAlpha field.

Parameters:

borderAlphathe new value for borderAlpha

setBorderColor

void setBorderColor(borderColor : String | Number)
Sets the borderColor field.

Parameters:

borderColorthe new value for borderColor

setBorderWidth

void setBorderWidth(borderWidth : int)
Sets the borderWidth field.

Parameters:

borderWidththe new value for borderWidth

setDataPadding

void setDataPadding(dataPadding : String)
Sets the dataPadding field.

Parameters:

dataPaddingthe new value for dataPadding

setLegendPlacement

void setLegendPlacement(legendPlacement : String)
Sets the legendPlacement field.

Parameters:

legendPlacementthe new value for legendPlacement, one of {'top','right','bottom','left'}

setTitlePlacement

void setTitlePlacement(titlePlacement : String)
Sets the titlePlacement field.

Parameters:

titlePlacementthe new value for titlePlacement, one of {'top','right','bottom','left'}