@@ -1379,7 +1379,7 @@ describe('waterfall hover', function() {
1379
1379
. then ( done ) ;
1380
1380
} ) ;
1381
1381
1382
- it ( 'should turn off percentages with hoveinfo none or skip' , function ( done ) {
1382
+ it ( 'should turn off hoverinfo flags with hoveinfo none or skip' , function ( done ) {
1383
1383
gd = createGraphDiv ( ) ;
1384
1384
1385
1385
var mock = Lib . extendDeep ( { } , require ( '@mocks/text_chart_arrays' ) ) ;
@@ -1406,7 +1406,7 @@ describe('waterfall hover', function() {
1406
1406
. then ( done ) ;
1407
1407
} ) ;
1408
1408
1409
- it ( 'should turn on percentages with hoveinfo all' , function ( done ) {
1409
+ it ( 'should turn on hoverinfo flags with hoveinfo all' , function ( done ) {
1410
1410
gd = createGraphDiv ( ) ;
1411
1411
1412
1412
var mock = Lib . extendDeep ( { } , require ( '@mocks/text_chart_arrays' ) ) ;
@@ -1426,9 +1426,9 @@ describe('waterfall hover', function() {
1426
1426
. then ( function ( ) {
1427
1427
assertHoverLabelContent ( {
1428
1428
nums : [
1429
- '1001\nHover text A\nFinal: 1001 \n1 ▲\nInitial: 1000' ,
1430
- '1002\nHover text G\nFinal: 1002 \n2 ▲\nInitial: 1000' ,
1431
- '1,001.5\na (hover)\nFinal: 1 ,001.5\n1.5 ▲\nInitial: 1000'
1429
+ '1001\nHover text A\n1001 \n1 ▲\nInitial: 1000' ,
1430
+ '1002\nHover text G\n1002 \n2 ▲\nInitial: 1000' ,
1431
+ '1,001.5\na (hover)\n1 ,001.5\n1.5 ▲\nInitial: 1000'
1432
1432
] ,
1433
1433
name : [ 'Lines, Marke...' , 'Lines and Text' , 'missing text' ] ,
1434
1434
axis : '0'
@@ -1486,7 +1486,7 @@ describe('waterfall hover', function() {
1486
1486
} )
1487
1487
. then ( function ( ) {
1488
1488
assertHoverLabelContent ( {
1489
- nums : '2.2\nFinal: 2 .2\n4.4 ▲\nInitial: −2.2' ,
1489
+ nums : '2.2\n2 .2\n4.4 ▲\nInitial: −2.2' ,
1490
1490
name : '' ,
1491
1491
axis : 'E'
1492
1492
} ) ;
@@ -1522,31 +1522,31 @@ describe('waterfall hover', function() {
1522
1522
. then ( function ( ) {
1523
1523
var out = _hover ( gd , 0 , 1000.5 , 'closest' ) ;
1524
1524
expect ( out . yLabelVal ) . toEqual ( 1002.201 ) ;
1525
- expect ( out . extraText ) . toEqual ( 'Final: $1,002.201m<br>$ 2.2m ▲<br>Initial: $1,000.001m ' ) ;
1525
+ expect ( out . extraText ) . toEqual ( '$ 2.2m ▲' ) ;
1526
1526
expect ( out . style ) . toEqual ( [ 0 , '#4499FF' , 0 , 1002.201 ] ) ;
1527
1527
} )
1528
1528
. then ( function ( ) {
1529
1529
var out = _hover ( gd , 1 , 1000.5 , 'closest' ) ;
1530
1530
expect ( out . yLabelVal ) . toEqual ( 1001.101 ) ;
1531
- expect ( out . extraText ) . toEqual ( 'Final: $1,001.101m<br>($1.1m) ▼<br>Initial: $1,002.201m' ) ;
1531
+ expect ( out . extraText ) . toEqual ( '$1,001.101m<br>($1.1m) ▼<br>Initial: $1,002.201m' ) ;
1532
1532
expect ( out . style ) . toEqual ( [ 1 , '#FF4136' , 1 , 1001.101 ] ) ;
1533
1533
} )
1534
1534
. then ( function ( ) {
1535
1535
var out = _hover ( gd , 2 , 1000.5 , 'closest' ) ;
1536
1536
expect ( out . yLabelVal ) . toEqual ( 1001.101 ) ;
1537
- expect ( out . extraText ) . toEqual ( 'Final: $1,001.101m<br>$1. 1m ▲<br>Initial: $1,000.001m ' ) ;
1537
+ expect ( out . extraText ) . toEqual ( '$1. 1m ▲' ) ;
1538
1538
expect ( out . style ) . toEqual ( [ 2 , '#4499FF' , 2 , 1001.101 ] ) ;
1539
1539
} )
1540
1540
. then ( function ( ) {
1541
1541
var out = _hover ( gd , 3 , 1000.5 , 'closest' ) ;
1542
1542
expect ( out . yLabelVal ) . toEqual ( 1004.401 ) ;
1543
- expect ( out . extraText ) . toEqual ( 'Final: $1,004.401m<br>$3.3m ▲<br>Initial: $1,001.101m' ) ;
1543
+ expect ( out . extraText ) . toEqual ( '$1,004.401m<br>$3.3m ▲<br>Initial: $1,001.101m' ) ;
1544
1544
expect ( out . style ) . toEqual ( [ 3 , '#3D9970' , 3 , 1004.401 ] ) ;
1545
1545
} )
1546
1546
. then ( function ( ) {
1547
1547
var out = _hover ( gd , 4 , 1000.5 , 'closest' ) ;
1548
1548
expect ( out . yLabelVal ) . toEqual ( 1004.401 ) ;
1549
- expect ( out . extraText ) . toEqual ( 'Final: $1,004.401m<br>$ 4.4m ▲<br>Initial: $1,000.001m ' ) ;
1549
+ expect ( out . extraText ) . toEqual ( '$ 4.4m ▲' ) ;
1550
1550
expect ( out . style ) . toEqual ( [ 4 , '#4499FF' , 4 , 1004.401 ] ) ;
1551
1551
} )
1552
1552
. catch ( failTest )
0 commit comments