dojox/charting/bidi/Chart (version 1.10)

Property Summary

  • dirMirroring support, the main variable which is responsible for the direction of the chart.
  • isMirrored
  • textDirBi-directional support, the main variable which is responsible for the direction of the text.

Method Summary

Properties

dir

Mirroring support, the main variable which is responsible for the direction of the chart.

Allowed values: 1. "ltr" 2. "rtl"

By default is ltr.

isMirrored
textDir

Bi-directional support, the main variable which is responsible for the direction of the text. The text direction can be different than the GUI direction by using this parameter. Allowed values:

  1. "ltr"
  2. "rtl"
  3. "auto" - contextual the direction of a text defined by first strong letter.

By default is as the page direction.

Methods

_resetLeftBottom(axis)
Parameter Type Description
axis undefined
applyMirroring(plot,dim,offsets)

apply the mirroring operation to the current chart plots.

Parameter Type Description
plot undefined
dim undefined
offsets undefined
Returns:function

apply the mirroring operation to the current chart plots.

formatTruncatedLabel(element,label,labelType)
Parameter Type Description
element undefined
label undefined
labelType undefined
getTextDir(text)

Return direction of the text.

If textDir is ltr or rtl returns the value. If it's auto, calls to another function that responsible for checking the value, and defining the direction.

Parameter Type Description
text undefined

Used in case textDir is "auto", this case the direction is according to the first strong (directionally - which direction is strong defined) letter.

Returns:undefined
isRightToLeft()

check the direction of the chart.

check the dir attribute to determine the rendering direction of the chart.

Returns:boolean
postscript(node,args)

Kicks off chart instantiation.

Used for setting the textDir of the chart.

Parameter Type Description
node undefined
args undefined
render()
Returns:function
setDir(dir)

Setter for the dir attribute.

Allows dynamically set the dri attribute, which will used to updates the chart rendering direction. dir : the desired chart direction [rtl: for right to left ,ltr: for left to right]

Parameter Type Description
dir undefined
Returns:function

Setter for the dir attribute.

setTextDir(newTextDir,obj)

Setter for the textDir attribute.

Allows dynamically set the textDir, goes over all the text-children and
updates their base text direction.

Parameter Type Description
newTextDir undefined
obj undefined
Returns:function

Setter for the textDir attribute.

truncateBidi(elem,label,labelType)

Enables bidi support for truncated labels.

Can be two types of labels: html or gfx.

gfx labels:

Need to be stored in registry to be used when the textDir will be set dynamically. Additional work on truncated labels is needed for case as 111111A (A stands for "bidi" character rtl directioned). let's say in this case the truncation is "111..." If the textDir is auto, the display should be: "...111" but in gfx case we will get "111...". Because this.surface.setTextDir will calculate the dir of truncated label, which value is "111..." but th real is "111111A". each time we created a gfx truncated label we store it in the truncatedLabelsRegistry.

html labels:

no need for repository (stored in another place). Here we only need to update the current dir according to textDir.

Parameter Type Description
elem undefined
label undefined
labelType undefined
Error in the documentation? Can’t find what you are looking for? Let us know!