@@ -27,6 +27,7 @@ var ONEDAY = constants.ONEDAY;
27
27
var ONEHOUR = constants . ONEHOUR ;
28
28
var ONEMIN = constants . ONEMIN ;
29
29
var ONESEC = constants . ONESEC ;
30
+ var MINUS_SIGN = constants . MINUS_SIGN ;
30
31
31
32
var MID_SHIFT = require ( '../../constants/alignment' ) . MID_SHIFT ;
32
33
@@ -1304,7 +1305,7 @@ function formatLog(ax, out, hover, extraPrecision, hideexp) {
1304
1305
if ( p === 0 ) out . text = 1 ;
1305
1306
else if ( p === 1 ) out . text = '10' ;
1306
1307
else if ( p > 1 ) out . text = '10<sup>' + p + '</sup>' ;
1307
- else out . text = '10<sup>\u2212' + - p + '</sup>' ;
1308
+ else out . text = '10<sup>' + MINUS_SIGN + - p + '</sup>' ;
1308
1309
1309
1310
out . fontSize *= 1.25 ;
1310
1311
}
@@ -1387,7 +1388,7 @@ function numFormat(v, ax, fmtoverride, hover) {
1387
1388
if ( ax . hoverformat ) tickformat = ax . hoverformat ;
1388
1389
}
1389
1390
1390
- if ( tickformat ) return d3 . format ( tickformat ) ( v ) . replace ( / - / g, '\u2212' ) ;
1391
+ if ( tickformat ) return d3 . format ( tickformat ) ( v ) . replace ( / - / g, MINUS_SIGN ) ;
1391
1392
1392
1393
// 'epsilon' - rounding increment
1393
1394
var e = Math . pow ( 10 , - tickRound ) / 2 ;
@@ -1437,7 +1438,7 @@ function numFormat(v, ax, fmtoverride, hover) {
1437
1438
// add exponent
1438
1439
if ( exponent && exponentFormat !== 'hide' ) {
1439
1440
var signedExponent ;
1440
- if ( exponent < 0 ) signedExponent = '\u2212' + - exponent ;
1441
+ if ( exponent < 0 ) signedExponent = MINUS_SIGN + - exponent ;
1441
1442
else if ( exponentFormat !== 'power' ) signedExponent = '+' + exponent ;
1442
1443
else signedExponent = String ( exponent ) ;
1443
1444
@@ -1463,11 +1464,10 @@ function numFormat(v, ax, fmtoverride, hover) {
1463
1464
// put sign back in and return
1464
1465
// replace standard minus character (which is technically a hyphen)
1465
1466
// with a true minus sign
1466
- if ( isNeg ) return '\u2212' + v ;
1467
+ if ( isNeg ) return MINUS_SIGN + v ;
1467
1468
return v ;
1468
1469
}
1469
1470
1470
-
1471
1471
axes . subplotMatch = / ^ x ( [ 0 - 9 ] * ) y ( [ 0 - 9 ] * ) $ / ;
1472
1472
1473
1473
// getSubplots - extract all combinations of axes we need to make plots for
0 commit comments