dojox/charting/plot2d/Grid (version 1.10)

dojox/charting/plot2d/CartesianBase

Summary

A "faux" plot that can be placed behind other plots to represent a grid against which other plots can be easily measured.

Usage

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

The chart this plot belongs to.

kwArgs Object
Optional

An optional keyword arguments object to help define the parameters of the underlying grid.

Property Summary

Method Summary

  • _animateGrid(shape,type,offset,size)
  • _getLabel(number)
  • _plotFill(fill,dim,offsets)
  • _pseudoRadialFill(fill,center,radius,start,end)
  • _renderHLines(ticks,lineStroke,dim,offsets,vScaler,vt)
  • _renderHRect(ticks,theme,dim,offsets,vScaler,vt)
  • _renderVLines(ticks,lineStroke,dim,offsets,hScaler,ht)
  • _renderVRect(ticks,theme,dim,offsets,hScaler,ht)
  • _shapeFill(fill,bbox)
  • addSeries(run) Ignored but included as a dummy method.
  • 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()
  • clear() Clear out all of the information tied to this plot.
  • createLabel(group,value,bbox,theme)
  • createLine(creator,params)
  • createRect(creator,params)
  • 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.
  • getGroup()
  • getRequiredColors() Get how many data series we have, so we know how many colors to use.
  • 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(dim,stats) Initializes scalers using attached axes.
  • isDataDirty() Returns whether or not any of this plot's data series need to be rendered.
  • isDirty() Returns whether or not this plot needs to be rendered.
  • performZoom(dim,offsets) Create/alter any zooming windows on this plot.
  • purgeGroup()
  • render(dim,offsets) Render the plot on the chart.
  • renderLabel(group,x,y,label,theme,block,align)
  • setAxis(axis) Set an axis for this plot.
  • toData(coord) Compute plot axis data coordinates from page coordinates.
  • toPage(coord) Compute page coordinates from plot axis data coordinates.

Properties

baseParams
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

_animateGrid(shape,type,offset,size)
Parameter Type Description
shape undefined
type undefined
offset undefined
size undefined
_getLabel(number)
Parameter Type Description
number undefined
Returns: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
_renderHLines(ticks,lineStroke,dim,offsets,vScaler,vt)
Parameter Type Description
ticks undefined
lineStroke undefined
dim undefined
offsets undefined
vScaler undefined
vt undefined
_renderHRect(ticks,theme,dim,offsets,vScaler,vt)
Parameter Type Description
ticks undefined
theme undefined
dim undefined
offsets undefined
vScaler undefined
vt undefined
_renderVLines(ticks,lineStroke,dim,offsets,hScaler,ht)
Parameter Type Description
ticks undefined
lineStroke undefined
dim undefined
offsets undefined
hScaler undefined
ht undefined
_renderVRect(ticks,theme,dim,offsets,hScaler,ht)
Parameter Type Description
ticks undefined
theme undefined
dim undefined
offsets undefined
hScaler undefined
ht undefined
_shapeFill(fill,bbox)
Parameter Type Description
fill undefined
bbox undefined
Returns:undefined
addSeries(run)

Ignored but included as a dummy method.

Parameter Type Description
run undefined
Returns:dojox/charting/plot2d/Grid | 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()
clear()

Clear out all of the information tied to this plot.

A reference to this plot for functional chaining.

createLabel(group,value,bbox,theme)
Parameter Type Description
group undefined
value undefined
bbox undefined
theme undefined
createLine(creator,params)
Parameter Type Description
creator undefined
params undefined
Returns:undefined
createRect(creator,params)
Parameter Type Description
creator undefined
params undefined
Returns:undefined
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.

getGroup()
Returns:undefined
getRequiredColors()

Get how many data series we have, so we know how many colors to use.

Returns:Number | undefined

The number of colors needed.

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(dim,stats)

Initializes scalers using attached axes.

Parameter Type Description
dim Object

Size of a plot area in pixels as {width, height}.

stats Object

Min/max of data in both directions as {hmin, hmax, vmin, vmax}.

A reference to this plot for functional chaining.

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.

isDirty()

Returns whether or not this plot needs to be rendered.

Returns:Boolean | undefined

The state of the plot.

performZoom(dim,offsets)

Create/alter any zooming windows on this plot.

Parameter Type Description
dim Object

An object of the form { width, height }.

offsets Object

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

A reference to this plot for functional chaining.

purgeGroup()
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/Grid | undefined | 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
setAxis(axis)

Set an axis for this plot.

Parameter Type Description
axis dojox/charting/axis2d/Base

The axis to set.

A reference to this plot for functional chaining.

toData(coord)

Compute plot axis data coordinates from page coordinates.

Parameter Type Description
coord Object

The pixel coordinate in page coordinate space. That is of the following form: { x: 50, y: 200 } If not provided return the tranform method instead of the result of the transformation.

Returns:Object | function

The resulting plot axis data coordinates. For cartesian charts that is of the following form: { hAxisName: 50, vAxisName: 200 }

toPage(coord)

Compute page coordinates from plot axis data coordinates.

Parameter Type Description
coord Object
Optional

The coordinates in plot axis data coordinate space. For cartesian charts that is of the following form: { hAxisName: 50, vAxisName: 200 } If not provided return the transform method instead of the result of the transformation.

Returns:Object | function

The resulting page pixel coordinates. That is of the following form: { x: 50, y: 200 }

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