| 1 |
define(["dojo/_base/declare", "dojo/dom-style"], |
| 2 |
function(declare, domStyle){ |
| 3 |
|
| 4 |
|
| 5 |
return declare(null, { |
| 6 |
labelTooltip: function(elem, chart, label, truncatedLabel, font, elemType){ |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
var isChartDirectionRtl = (domStyle.get(chart.node,"direction") == "rtl"); |
| 11 |
var isBaseTextDirRtl = (chart.getTextDir(label) == "rtl"); |
| 12 |
|
| 13 |
if(isBaseTextDirRtl && !isChartDirectionRtl){ |
| 14 |
label = "<span dir='rtl'>" + label +"</span>"; |
| 15 |
} |
| 16 |
if(!isBaseTextDirRtl && isChartDirectionRtl){ |
| 17 |
label = "<span dir='ltr'>" + label +"</span>"; |
| 18 |
} |
| 19 |
this.inherited(arguments); |
| 20 |
}, |
| 21 |
|
| 22 |
_isRtl: function(){ |
| 23 |
return this.chart.isRightToLeft(); |
| 24 |
} |
| 25 |
}); |
| 26 |
}); |
| 27 |
|