Opened 13 years ago

Closed 9 years ago

#7569 closed defect (fixed)

dojox.charting issue with label offsets in RTL mode

Reported by: Jared Jurkiewicz Owned by: Eugene Lazutkin
Priority: high Milestone: 1.7
Component: Charting Version: 1.1.1
Keywords: bidi Cc: cjolif
Blocked By: Blocking:


dojox.charting issue with label offsets in RTL mode

This issue was reported by a co-worker, so I'm mirroring it here

When opening a dojox.charting Chart2D in a right to left language (like Hebrew) the labels of the axes are drawn on the right hand side of the div holding the chart.

This can easily be fixed by adding the following lines to dojox.charting.axis2d.Default.js function render (after calculating the label offsets and before rendering the shapes):

if (!dojo._isBodyLtr()){

labelOffset.x = labelOffset.x - dim.width;


Change History (9)

comment:1 Changed 13 years ago by Eugene Lazutkin

Milestone: tbdfuture
Priority: normalhigh
Status: newassigned

comment:2 Changed 12 years ago by Eugene Lazutkin

Well, I am not sure that underlying renderers (SVG, VML, Silverlight) support LTR text. Nobody audited dojox.gfx for i18n. I imagine that the problem is much bigger than calculating the correct offset.

comment:3 Changed 12 years ago by Eugene Lazutkin

Related: #8070, #8071.

comment:4 Changed 12 years ago by Adam Peller

Keywords: bidi added

comment:5 Changed 11 years ago by JayZ(zhouxiang)

SVG do support LTR text, and I find out the problem here is the html label, not the SVG/VML/Silverlight text label, so seems we need to adjust the html label position here to make sure the html label is at the right position corresponding svg/vml.. chart plot when RTL

comment:6 Changed 10 years ago by JayZ(zhouxiang)

This fix: if (!dojo._isBodyLtr()){

labelOffset.x = labelOffset.x - dim.width;

} only make the whole X label place at the right position, it hasn't solve the whole Bidi problem, we also have to make the plot lies form right to left, and the x axis from the right to left(ticks value increased from right to left, label placed from right to left, etc...), and this should be support in all plots, which will cause a lot code change even structire change.

comment:7 Changed 9 years ago by cjolif

I suspect this is fixed in 1.7 as soon as you include dojox/charting/BidiSupport module. Can you confirm?

comment:8 Changed 9 years ago by cjolif

Cc: cjolif added

comment:9 Changed 9 years ago by cjolif

Milestone: future1.7
Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.