dojox/charting/plot2d/Pie (version 1.10)

dojox/charting/plot2d/Base, dojox/charting/plot2d/_PlotEvents

Summary

The plot that represents a typical pie chart.

Usage

var foo = new Pie(chart,kwArgs);
dojox/charting/plot2d/Pie
Parameter Type Description
chart undefined
kwArgs undefined

Property Summary

Method Summary

  • _calculateLabelR(firstSlice,slices,labelHeight)
  • _connectEvents(o)
  • _connectSingleEvent(o,eventName)
  • _getLabel(number)
  • _getProperLabelRadius(slices,labelHeight,minRidius)
  • _plotFill(fill,dim,offsets)
  • _pseudoRadialFill(fill,center,radius,start,end)
  • _reconnectEvents(seriesName)
  • _shapeFill(fill,bbox)
  • addSeries(run) Add a series of data to this plot.
  • assignAxes(axes) From an array of axes pick the ones that correspond to this plot and assign them to the plot using setAxis method.
  • calculateAxes(dim) Stub function for running the axis calculations (deprecated).
  • cleanGroup(creator) Clean any elements (HTML or GFX-based) out of our group, and create a new one.
  • clear() Clear out all of the information tied to this plot.
  • connect(object,method) Helper function to connect any object's method to our plotEvent.
  • destroy() API addition to conform to the rest of the Dojo Toolkit's standard.
  • destroyHtmlElements() Destroy any DOMNodes that may have been created as a part of this element.
  • events() Find out if any event handlers have been connected to our plotEvent.
  • fireEvent(seriesName,eventName,index,eventObject) Emulates firing an event for a given data value (specified by an index) of a given series.
  • getGroup()
  • getRequiredColors() Return the number of colors needed to draw this plot.
  • getSeriesStats() Returns default stats (irrelevant for this type of plot).
  • getTextWidth(s,font)
  • getTextWithLimitCharCount(s,font,wcLimit,truncated) Get the truncated string based on the limited character count(dichotomy algorithm)
  • getTextWithLimitLength(s,font,limitWidth,truncated) Get the truncated string based on the limited width in px(dichotomy algorithm)
  • initializeScalers() Does nothing.
  • isDataDirty() Returns whether or not any of this plot's data series need to be rendered.
  • plotEvent(o) Stub function for use by specific plots.
  • purgeGroup() Clear any elements out of our group, and destroy the group.
  • raiseEvent(o) Raises events in predefined order
  • render(dim,offsets) Render the plot on the chart.
  • renderLabel(group,x,y,label,theme,block,align)
  • resetEvents() Reset all events attached to our plotEvent (i.e. disconnect).
  • setAxis(axis) Dummy method, since axes are irrelevant with a Pie chart.

Properties

chart

The parent chart for this element.

defaultParams
dirty

A flag indicating whether or not this element needs to be rendered.

group

The visual GFX group representing this element.

htmlElement

Any DOMNodes used as a part of this element (such as HTML-based labels).

htmlElements
optionalParams
renderingOptions

Methods

_calculateLabelR(firstSlice,slices,labelHeight)
Parameter Type Description
firstSlice undefined
slices undefined
labelHeight undefined
_connectEvents(o)
Parameter Type Description
o undefined
_connectSingleEvent(o,eventName)
Parameter Type Description
o undefined
eventName undefined
_getLabel(number)
Parameter Type Description
number undefined
Returns:undefined
_getProperLabelRadius(slices,labelHeight,minRidius)
Parameter Type Description
slices undefined
labelHeight undefined
minRidius undefined
_plotFill(fill,dim,offsets)
Parameter Type Description
fill undefined
dim undefined
offsets undefined
Returns:undefined
_pseudoRadialFill(fill,center,radius,start,end)
Parameter Type Description
fill undefined
center undefined
radius undefined
start undefined
end undefined
Returns:undefined | object
_reconnectEvents(seriesName)
Parameter Type Description
seriesName undefined
_shapeFill(fill,bbox)
Parameter Type Description
fill undefined
bbox undefined
Returns:undefined
addSeries(run)

Add a series of data to this plot.

Parameter Type Description
run undefined
Returns:dojox/charting/plot2d/Pie | function

The reference to this plot for functional chaining.

assignAxes(axes)

From an array of axes pick the ones that correspond to this plot and assign them to the plot using setAxis method.

Parameter Type Description
axes Array

An array of dojox/charting/axis2d/Base

calculateAxes(dim)

Stub function for running the axis calculations (deprecated).

Parameter Type Description
dim Object

An object of the form { width, height }

Returns:dojox/charting/plot2d/Base | function

A reference to this plot for functional chaining.

cleanGroup(creator)

Clean any elements (HTML or GFX-based) out of our group, and create a new one.

Parameter Type Description
creator dojox/gfx/shape.Surface
Optional

An optional surface to work with.

Returns:dojox/charting/Element | function

A reference to this object for functional chaining.

clear()

Clear out all of the information tied to this plot.

Returns:dojox/charting/plot2d/Pie | function

A reference to this plot for functional chaining.

connect(object,method)

Helper function to connect any object's method to our plotEvent.

Parameter Type Description
object Object

The object to connect to.

method String | Function

The method to fire when our plotEvent is fired.

Returns:Array | undefined

The handle as returned from dojo.connect (see dojo.connect).

destroy()

API addition to conform to the rest of the Dojo Toolkit's standard.

destroyHtmlElements()

Destroy any DOMNodes that may have been created as a part of this element.

events()

Find out if any event handlers have been connected to our plotEvent.

Returns:Boolean | boolean

A flag indicating that there are handlers attached.

fireEvent(seriesName,eventName,index,eventObject)

Emulates firing an event for a given data value (specified by an index) of a given series.

Parameter Type Description
seriesName String

Series name.

eventName String

Event name to emulate.

index Number

Valid data value index used to raise an event.

eventObject Object
Optional

Optional event object. Especially useful for synthetic events. Default: null.

getGroup()
Returns:undefined
getRequiredColors()

Return the number of colors needed to draw this plot.

Returns:number
getSeriesStats()

Returns default stats (irrelevant for this type of plot).

Returns:Object | undefined

{hmin, hmax, vmin, vmax} min/max in both directions.

getTextWidth(s,font)
Parameter Type Description
s undefined
font undefined
Returns:number
getTextWithLimitCharCount(s,font,wcLimit,truncated)

Get the truncated string based on the limited character count(dichotomy algorithm)

Parameter Type Description
s String
Optional

candidate text.

font String
Optional

text's font style.

wcLimit Number
Optional

text limited character count.

truncated Boolean
Optional

whether the input text(s) has already been truncated.

Returns:Object | object
{
    text: processed text, maybe truncated or not,
    truncated: whether text has been truncated
}
getTextWithLimitLength(s,font,limitWidth,truncated)

Get the truncated string based on the limited width in px(dichotomy algorithm)

Parameter Type Description
s String
Optional

candidate text.

font String
Optional

text's font style.

limitWidth Number
Optional

text limited width in px.

truncated Boolean
Optional

whether the input text(s) has already been truncated.

Returns:Object | object
{
    text: processed text, maybe truncated or not,
    truncated: whether text has been truncated
}
initializeScalers()

Does nothing.

Returns:function

Does nothing.

isDataDirty()

Returns whether or not any of this plot's data series need to be rendered.

Returns:Boolean | undefined

Flag indicating if any of this plot's series are invalid and need rendering.

plotEvent(o)

Stub function for use by specific plots.

Parameter Type Description
o Object

An object intended to represent event parameters.

purgeGroup()

Clear any elements out of our group, and destroy the group.

Returns:dojox/charting/Element | function

A reference to this object for functional chaining.

raiseEvent(o)

Raises events in predefined order

Parameter Type Description
o Object

An object intended to represent event parameters.

render(dim,offsets)

Render the plot on the chart.

Parameter Type Description
dim Object

An object of the form { width, height }.

offsets Object

An object of the form { l, r, t, b }.

Returns:dojox/charting/plot2d/Pie | function

A reference to this plot for functional chaining.

renderLabel(group,x,y,label,theme,block,align)
Parameter Type Description
group undefined
x undefined
y undefined
label undefined
theme undefined
block undefined
align undefined
Returns:undefined
resetEvents()

Reset all events attached to our plotEvent (i.e. disconnect).

setAxis(axis)

Dummy method, since axes are irrelevant with a Pie chart.

Parameter Type Description
axis undefined
Returns:dojox/charting/plot2d/Pie | function

The reference to this plot for functional chaining.

Error in the documentation? Can’t find what you are looking for? Let us know!