OverviewSingleDeprecated

jsx3.chart

class PieChart

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

All Implemented Interfaces:

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

class PieChart
extends jsx3.chart.RadialChart
A pie chart.

Series: PieSeries only.
Axes: No axes, it's a radial chart.

Constructor Summary
void
init(name : String, left : int, top : int, width : int, height : int)
The instance initializer.
Method Summary
static jsx3.vector.Fill
defaultColoring(record : jsx3.xml.Entity, index : int)
default coloring scheme for pie series, simply converts the default coloring scheme for series into a coloring scheme for categories
String
Returns the categoryField field, the attribute of a record that contains the category name value; necessary because there is no CategoryAxis to define this in a radial chart.
Function
Returns the colorFunction field, a function that defines how to color in the slices of each data series in this chart, with the signature function(record, index) : jsx3.vector.Fill; may be overridden by jsx3.chart.PieSeries.colorFunction for an individual series.
Array<String | int>
Returns the colors field, an array of string representations of a vector fill, to color in the slices of all the data series; may be overridden by jsx3.chart.PieSeries.colors for an individual series.
float
Returns the innerRadius field, the radius as the hole in the middle of the pie as a ratio of the entire radius.
float
Returns the seriesPadding field, the amount of padding between rings in a doughnut chart as a ratio of the width of a ring.
String
Returns the seriesStroke field, string representation of a VectorStroke to outline the slices of all the series with; may be overridden by jsx3.chart.PieSeries.stroke for an individual series.
int
Returns the startAngle field, the start angle of the first slice in each series; 0 points upwards and increasing values go clockwise; may be overridden on a series-by-series basis by jsx3.chart.PieSeries.startAngle.
int
Returns the totalAngle field, the total angle used for each series; may be overridden on a series-by-series basis by jsx3.chart.PieSeries.totalAngle.
static String
Deprecated.
void
setCategoryField(categoryField : String)
Sets the categoryField field.
void
setColorFunction(colorFunction : String)
Sets the colorFunction field.
void
setColors(colors : Array<String | int>)
Sets the colors field.
void
setInnerRadius(innerRadius : float)
Sets the innerRadius field.
void
setSeriesPadding(seriesPadding : float)
Sets the seriesPadding field.
void
setSeriesStroke(seriesStroke : String)
Sets the seriesStroke field.
void
setStartAngle(startAngle : int)
Sets the startAngle field.
void
setTotalAngle(totalAngle : int)
Sets the totalAngle field.
Methods Inherited From jsx3.chart.Chart
getAlpha, getBorderAlpha, getBorderColor, getBorderWidth, getChartTitle, getDataPadding, getLegend, getLegendEntryType, getLegendPlacement, getSeries, getSeriesIndex, getTitlePlacement, redrawRecord, setAlpha, setBorderAlpha, setBorderColor, setBorderWidth, setDataPadding, setLegendPlacement, setTitlePlacement
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
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

defaultColoring

static jsx3.vector.Fill defaultColoring(record : jsx3.xml.Entity, index : int)
default coloring scheme for pie series, simply converts the default coloring scheme for series into a coloring scheme for categories

Parameters:

record
indexthe index of the record in the data provider

Returns:

 

getCategoryField

String getCategoryField()
Returns the categoryField field, the attribute of a record that contains the category name value; necessary because there is no CategoryAxis to define this in a radial chart.

Returns:

categoryField  

getColorFunction

Function getColorFunction()
Returns the colorFunction field, a function that defines how to color in the slices of each data series in this chart, with the signature function(record, index) : jsx3.vector.Fill; may be overridden by jsx3.chart.PieSeries.colorFunction for an individual series..

Returns:

colorFunction  

getColors

Array<String | int> getColors()
Returns the colors field, an array of string representations of a vector fill, to color in the slices of all the data series; may be overridden by jsx3.chart.PieSeries.colors for an individual series..

Returns:

colors  

getInnerRadius

float getInnerRadius()
Returns the innerRadius field, the radius as the hole in the middle of the pie as a ratio of the entire radius.

Returns:

innerRadius  

getSeriesPadding

float getSeriesPadding()
Returns the seriesPadding field, the amount of padding between rings in a doughnut chart as a ratio of the width of a ring.

Returns:

seriesPadding  

getSeriesStroke

String getSeriesStroke()
Returns the seriesStroke field, string representation of a VectorStroke to outline the slices of all the series with; may be overridden by jsx3.chart.PieSeries.stroke for an individual series..

Returns:

seriesStroke  

getStartAngle

int getStartAngle()
Returns the startAngle field, the start angle of the first slice in each series; 0 points upwards and increasing values go clockwise; may be overridden on a series-by-series basis by jsx3.chart.PieSeries.startAngle.

Returns:

startAngle  

getTotalAngle

int getTotalAngle()
Returns the totalAngle field, the total angle used for each series; may be overridden on a series-by-series basis by jsx3.chart.PieSeries.totalAngle.

Returns:

totalAngle  

getVersion

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

Returns:

 

setCategoryField

void setCategoryField(categoryField : String)
Sets the categoryField field.

Parameters:

categoryFieldthe new value for categoryField

setColorFunction

void setColorFunction(colorFunction : String)
Sets the colorFunction field.

Parameters:

colorFunctionthe new value for colorFunction, should eval to a function with the signature function(record, index) : jsx3.vector.Fill

setColors

void setColors(colors : Array<String | int>)
Sets the colors field.

Parameters:

colorsthe new value for colors

setInnerRadius

void setInnerRadius(innerRadius : float)
Sets the innerRadius field.

Parameters:

innerRadiusthe new value for innerRadius, between 0.0 and 1.0

setSeriesPadding

void setSeriesPadding(seriesPadding : float)
Sets the seriesPadding field.

Parameters:

seriesPaddingthe new value for seriesPadding, positive value, not too big

setSeriesStroke

void setSeriesStroke(seriesStroke : String)
Sets the seriesStroke field.

Parameters:

seriesStrokethe new value for seriesStroke

setStartAngle

void setStartAngle(startAngle : int)
Sets the startAngle field.

Parameters:

startAnglethe new value for startAngle, between 0 and 360

setTotalAngle

void setTotalAngle(totalAngle : int)
Sets the totalAngle field.

Parameters:

totalAnglethe new value for totalAngle, between 0 and 360