Skip to content

Commit 6cf80de

Browse files
committed
Update code & mocks to not depend on entity decode
1 parent 6a66569 commit 6cf80de

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/plots/cartesian/axes.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,8 @@ function formatLinear(ax, out, hover, extraPrecision, hideexp) {
10531053
// new, more reliable procedure than d3.round or similar:
10541054
// add half the rounding increment, then stringify and truncate
10551055
// also automatically switch to sci. notation
1056-
var SIPREFIXES = ['f', 'p', 'n', 'μ', 'm', '', 'k', 'M', 'G', 'T'];
1056+
var SIPREFIXES = ['f', 'p', 'n', 'μ', 'm', '', 'k', 'M', 'G', 'T'];
1057+
10571058
function numFormat(v, ax, fmtoverride, hover) {
10581059
// negative?
10591060
var isNeg = v < 0,
@@ -1144,7 +1145,7 @@ function numFormat(v, ax, fmtoverride, hover) {
11441145
v += 'E' + signedExponent;
11451146
}
11461147
else if(exponentFormat === 'power') {
1147-
v += '&times;10<sup>' + signedExponent + '</sup>';
1148+
v += '×10<sup>' + signedExponent + '</sup>';
11481149
}
11491150
else if(exponentFormat === 'B' && exponent === 9) {
11501151
v += 'B';

src/plots/cartesian/graph_interact.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ function cleanPoint(d, hovermode) {
695695
d.xLabel += ' +' + xeText + ' / -' +
696696
Axes.tickText(d.xa, d.xa.c2l(d.xerrneg), 'hover').text;
697697
}
698-
else d.xLabel += ' &plusmn; ' + xeText;
698+
else d.xLabel += ' ± ' + xeText;
699699

700700
// small distance penalty for error bars, so that if there are
701701
// traces with errors and some without, the error bar label will
@@ -708,7 +708,7 @@ function cleanPoint(d, hovermode) {
708708
d.yLabel += ' +' + yeText + ' / -' +
709709
Axes.tickText(d.ya, d.ya.c2l(d.yerrneg), 'hover').text;
710710
}
711-
else d.yLabel += ' &plusmn; ' + yeText;
711+
else d.yLabel += ' ± ' + yeText;
712712

713713
if(hovermode === 'y') d.distance += 1;
714714
}

test/image/mocks/axes_enumerated_ticks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"xaxis": {
3434
"ticktext": [
3535
"<span style=\"fill:green\">green</span> eggs",
36-
"&amp; ham",
36+
"& ham",
3737
"H<sub>2</sub>O",
3838
"Gorgonzola"
3939
],
@@ -47,4 +47,4 @@
4747
]
4848
}
4949
}
50-
}
50+
}

0 commit comments

Comments
 (0)