OverviewSingleDeprecated

jsx3.chart

class PieSeries

Object
->jsx3.lang.Object
  ->jsx3.app.Model
    ->jsx3.gui.Painted
      ->jsx3.gui.Block
        ->jsx3.chart.ChartComponent
          ->jsx3.chart.Series
            ->jsx3.chart.PieSeries

All Implemented Interfaces:

jsx3.gui.Interactive, jsx3.util.EventDispatcher

class PieSeries
extends jsx3.chart.Series
A data series for a pie chart. Draws a complete pie or ring of a doughnut. A pie series is slightly different from all the other series because it gets colored in by category instead of all one color. A pie series has the following fields:
xField
the attribute of a record to use as the relative size of each slice of the pie, required
totalAngle
the total angle for the series, if not set use the value from the chart
startAngle
the angle of the start of the first slice, 0 is top and increasing values go clockwise, if not set use the value from the chart
colors
an array of string representations of vector fills to color in the slices, if not set use the value from the chart
colorFunction
a function that determines the color of each slice, with the signature function(record, index) : jsx3.vector.Fill, if not set use the value from the chart
stroke
string representation of a VectorStroke to outline the slices with, if not set use the value from the chart
labelPlacement
where to place a label with the name of the series, relative to the series, one of {'top','right','bottom','left'}
labelOffset
the padding (may be negative) between the outer edge of the series and the close edge of the label

Constructor Summary
void
init(name : String, seriesName : String)
The instance initializer.
Method Summary
Array<String | int>
Returns the colors field, overrides per-chart setting in PieChart.
String
Returns the field field, the attribute of the data provider to use as values for this series.
int
Returns the labelOffset field, the pixel offset of the optional ChartLabel child.
String
Returns the labelPlacement field, where to place the optional ChartLabel child.
int
Returns the startAngle field, overrides per-chart setting in PieChart.
int
Returns the totalAngle field, overrides per-chart setting in PieChart.
Number
Returns the value of a data point in this series for the given record.
static String
Deprecated.
void
setColors(colors : Array<String | int>)
Sets the colors field.
void
setField(field : String)
Sets the field field.
void
setLabelOffset(labelOffset : int)
Sets the labelOffset field.
void
setLabelPlacement(labelPlacement : String)
Sets the labelPlacement field.
void
setStartAngle(startAngle : int)
Sets the startAngle field.
void
setTotalAngle(totalAngle : int)
Sets the totalAngle field.
static String
tooltip(series : jsx3.chart.Series, record : jsx3.xml.Entity, percent : ?)
The default tooltip function for this type of series.
Methods Inherited From jsx3.chart.Series
getColorFunction, getFill, getFillGradient, getIndex, getLabel, getSeriesName, getStroke, getTooltipFunction, getXAxis, getYAxis, setColorFunction, setFill, setFillGradient, setSeriesName, setStroke, setTooltipFunction
Methods Inherited From jsx3.chart.ChartComponent
getChart
Methods Inherited From jsx3.gui.Block
getBackground, getBackgroundColor, getBorder, getCSSOverride, getClassName, getColor, getCursor, getDimensions, getDisplay, getFontName, getFontSize, getFontWeight, getHeight, 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, seriesName : String)
The instance initializer.

Parameters:

namethe GI name of the instance
seriesNamethe name of the Series, will be displayed in the Legend for most chart types
Method Detail

getColors

Array<String | int> getColors()
Returns the colors field, overrides per-chart setting in PieChart.

Returns:

colors  

getField

String getField()
Returns the field field, the attribute of the data provider to use as values for this series.

Returns:

field  

getLabelOffset

int getLabelOffset()
Returns the labelOffset field, the pixel offset of the optional ChartLabel child.

Returns:

labelOffset  

getLabelPlacement

String getLabelPlacement()
Returns the labelPlacement field, where to place the optional ChartLabel child.

Returns:

labelPlacement  

getStartAngle

int getStartAngle()
Returns the startAngle field, overrides per-chart setting in PieChart.

Returns:

startAngle  

getTotalAngle

int getTotalAngle()
Returns the totalAngle field, overrides per-chart setting in PieChart.

Returns:

totalAngle  

getValue

Number getValue(record : jsx3.xml.Entity)
Returns the value of a data point in this series for the given record.

Parameters:

recordthe node

Returns:

 

getVersion

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

Returns:

 

setColors

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

Parameters:

colorsthe new value for colors

setField

void setField(field : String)
Sets the field field.

Parameters:

fieldthe new value for field

setLabelOffset

void setLabelOffset(labelOffset : int)
Sets the labelOffset field.

Parameters:

labelOffsetthe new value for labelOffset

setLabelPlacement

void setLabelPlacement(labelPlacement : String)
Sets the labelPlacement field.

Parameters:

labelPlacementthe new value for labelPlacement

setStartAngle

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

Parameters:

startAnglethe new value for startAngle

setTotalAngle

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

Parameters:

totalAnglethe new value for totalAngle

tooltip

static String tooltip(series : jsx3.chart.Series, record : jsx3.xml.Entity, percent : ?)
The default tooltip function for this type of series.

Parameters:

series
record
percent

Returns: