Skip to content

Commit 1304bc9

Browse files
committed
replace label to alias before prefix & suffix in tickText
1 parent 9314593 commit 1304bc9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/plots/cartesian/axes.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,6 +1654,11 @@ axes.tickText = function(ax, x, hover, noSuffixPrefix) {
16541654
else if(isAngular(ax)) formatAngle(ax, out, hover, extraPrecision, hideexp);
16551655
else formatLinear(ax, out, hover, extraPrecision, hideexp);
16561656

1657+
if(ax.labelalias) {
1658+
var t = ax.labelalias[out.text];
1659+
if(typeof t === 'string') out.text = t;
1660+
}
1661+
16571662
// add prefix and suffix
16581663
if(!noSuffixPrefix) {
16591664
if(ax.tickprefix && !isHidden(ax.showtickprefix)) out.text = ax.tickprefix + out.text;

0 commit comments

Comments
 (0)