@@ -468,7 +468,7 @@ QUnit.test('Returning correct nodes[].linksIn and nodes[].linksOut data in getAl
468468
469469 assert . equal ( nodes . length , 5 ) ;
470470 [ 'A' , 'B' , 'C' , 'M' , 'Y' ] . forEach ( function ( nodeName ) {
471- const node = find ( nodes , function ( node ) { return node . title === nodeName ; } ) ;
471+ const node = find ( nodes , function ( node ) { return node . label === nodeName ; } ) ;
472472 assert . equal ( node . linksIn . length , expected [ nodeName ] [ 0 ] ) ;
473473 assert . equal ( node . linksOut . length , expected [ nodeName ] [ 1 ] ) ;
474474 } ) ;
@@ -630,7 +630,7 @@ QUnit.test('Largest cascade occupies full chart height', function(assert) {
630630 let cascadeHeight = 0 ;
631631
632632 [ 'A' , 'B' , 'C' ] . forEach ( function ( nodeName ) {
633- const node = find ( nodes , function ( node ) { return node . title === nodeName ; } ) ;
633+ const node = find ( nodes , function ( node ) { return node . label === nodeName ; } ) ;
634634 cascadeHeight += node . rect . height + ( nodeName !== 'C' ? 30 : 0 ) ;
635635 } ) ;
636636
@@ -645,7 +645,7 @@ QUnit.test('Default align option', function(assert) {
645645 const nodes = sankey . getAllNodes ( ) ;
646646
647647 [ 'M' , 'Y' ] . forEach ( function ( nodeName ) {
648- const node = find ( nodes , function ( node ) { return node . title === nodeName ; } ) ;
648+ const node = find ( nodes , function ( node ) { return node . label === nodeName ; } ) ;
649649 assert . equal ( node . rect . y + node . rect . height / 2 , size . height / 2 , nodeName + ' aligned to middle' ) ;
650650 } ) ;
651651} ) ;
@@ -659,7 +659,7 @@ QUnit.test('Align option as <String>', function(assert) {
659659 const nodes = sankey . getAllNodes ( ) ;
660660
661661 [ 'C' , 'M' , 'Y' ] . forEach ( function ( nodeName ) {
662- const node = find ( nodes , function ( node ) { return node . title === nodeName ; } ) ;
662+ const node = find ( nodes , function ( node ) { return node . label === nodeName ; } ) ;
663663 assert . equal ( node . rect . y + node . rect . height , size . height , nodeName + ' aligned to bottom' ) ;
664664 } ) ;
665665} ) ;
@@ -672,7 +672,7 @@ QUnit.test('Align option as <Array>', function(assert) {
672672 const nodes = sankey . getAllNodes ( ) ;
673673
674674 [ 'A' , 'M' , 'Y' ] . forEach ( function ( nodeName ) {
675- const node = find ( nodes , function ( node ) { return node . title === nodeName ; } ) ;
675+ const node = find ( nodes , function ( node ) { return node . label === nodeName ; } ) ;
676676 assert . equal ( node . rect . y , 0 , nodeName + ' aligned to top' ) ;
677677 } ) ;
678678
@@ -687,7 +687,7 @@ QUnit.test('Default alignment value for cascade which is not mentioned in option
687687 alignment : [ 'top' ]
688688 } ) ;
689689 const nodes = sankey . getAllNodes ( ) ;
690- const node = find ( nodes , function ( node ) { return node . title === 'Z' ; } ) ;
690+ const node = find ( nodes , function ( node ) { return node . label === 'Z' ; } ) ;
691691
692692 // 'Z' is expected to be centered
693693 assert . equal ( node . rect . y , 15 , 'Z aligned to center' ) ;
@@ -786,8 +786,8 @@ QUnit.test('SortData option', function(assert) {
786786 sankey . option ( { sortData : { A : 2 , B : 1 } } ) ;
787787 const nodesSorted = sankey . getAllNodes ( ) ;
788788
789- assert . equal ( nodesSorted [ 0 ] . title , 'B' ) ;
790- assert . equal ( nodesSorted [ 1 ] . title , 'A' ) ;
789+ assert . equal ( nodesSorted [ 0 ] . label , 'B' ) ;
790+ assert . equal ( nodesSorted [ 1 ] . label , 'A' ) ;
791791} ) ;
792792
793793QUnit . test ( 'Align option updated as <String>' , function ( assert ) {
@@ -801,7 +801,7 @@ QUnit.test('Align option updated as <String>', function(assert) {
801801 const nodes = sankey . getAllNodes ( ) ;
802802
803803 [ 'C' , 'M' , 'Y' ] . forEach ( function ( nodeName ) {
804- const node = find ( nodes , function ( node ) { return node . title === nodeName ; } ) ;
804+ const node = find ( nodes , function ( node ) { return node . label === nodeName ; } ) ;
805805 assert . equal ( node . rect . y + node . rect . height , size . height , 'aligned to bottom' ) ;
806806 } ) ;
807807} ) ;
@@ -816,7 +816,7 @@ QUnit.test('Align option updated as <Array>', function(assert) {
816816 const nodes = sankey . getAllNodes ( ) ;
817817
818818 [ 'A' , 'M' , 'Y' ] . forEach ( function ( nodeName ) {
819- const node = find ( nodes , function ( node ) { return node . title === nodeName ; } ) ;
819+ const node = find ( nodes , function ( node ) { return node . label === nodeName ; } ) ;
820820 assert . equal ( node . rect . y , 0 , 'aligned to top' ) ;
821821 } ) ;
822822} ) ;
0 commit comments