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: |
Description
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
Milestone: | tbd → future |
---|---|
Priority: | normal → high |
Status: | new → assigned |
comment:2 Changed 12 years ago by
comment:4 Changed 12 years ago by
Keywords: | bidi added |
---|
comment:5 Changed 11 years ago by
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
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
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
Cc: | cjolif added |
---|
comment:9 Changed 9 years ago by
Milestone: | future → 1.7 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
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.