You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
['%{percentRoot} of %{root}',['100% of Eve','33% of Eve','17% of Eve','17% of Eve','17% of Eve','17% of Eve','17% of Eve','17% of Eve','17% of Eve']],
1347
1347
['%{percentEntry} of %{entry}',['100% of Eve','33% of Eve','17% of Eve','17% of Eve','17% of Eve','17% of Eve','17% of Eve','17% of Eve','17% of Eve']],
1348
-
['%{percentParent} of %{parent}',['%{percentParent} of %{parent}','100% of Seth','33% of Eve','17% of Eve','17% of Eve','17% of Eve','17% of Eve','50% of Seth','100% of Awan']],
1348
+
['%{percentParent} of %{parent}',['100% of Eve','100% of Seth','33% of Eve','17% of Eve','17% of Eve','17% of Eve','17% of Eve','50% of Seth','100% of Awan']],
1349
1349
[
1350
1350
[
1351
1351
'label: %{label}',
@@ -1389,7 +1389,7 @@ describe('Test sunburst texttemplate with *total* `values` should work at root l
['%{percentRoot} of %{root}',['100% of Eve','22% of Eve','18% of Eve','9% of Eve','9% of Eve','6% of Eve','15% of Eve','3% of Eve','2% of Eve']],
1391
1391
['%{percentEntry} of %{entry}',['100% of Eve','22% of Eve','18% of Eve','9% of Eve','9% of Eve','6% of Eve','15% of Eve','3% of Eve','2% of Eve']],
1392
-
['%{percentParent} of %{parent}',['%{percentParent} of %{parent}','22% of Eve','18% of Eve','9% of Eve','9% of Eve','6% of Eve','83% of Seth','17% of Seth','17% of Awan']],
1392
+
['%{percentParent} of %{parent}',['100% of Eve','22% of Eve','18% of Eve','9% of Eve','9% of Eve','6% of Eve','83% of Seth','17% of Seth','17% of Awan']],
1393
1393
[
1394
1394
[
1395
1395
'label: %{label}',
@@ -1433,7 +1433,7 @@ describe('Test sunburst texttemplate with *remainder* `values` should work at ro
['%{percentRoot} of %{root}',['100% of Eve','20% of Eve','12% of Eve','6% of Eve','5% of Eve','3% of Eve','8% of Eve','2% of Eve','1% of Eve']],
1435
1435
['%{percentEntry} of %{entry}',['100% of Eve','20% of Eve','12% of Eve','6% of Eve','5% of Eve','3% of Eve','8% of Eve','2% of Eve','1% of Eve']],
1436
-
['%{percentParent} of %{parent}',['%{percentParent} of %{parent}','20% of Eve','12% of Eve','6% of Eve','5% of Eve','3% of Eve','42% of Seth','8% of Seth','14% of Awan']],
1436
+
['%{percentParent} of %{parent}',['100% of Eve','20% of Eve','12% of Eve','6% of Eve','5% of Eve','3% of Eve','42% of Seth','8% of Seth','14% of Awan']],
vartext0=['forty','two','thirty-eight','one and a half','two and a half','thirty-four','one','two','three','twenty-eight','one and twenty-five hundredths','one and seventy-five hundredths','two and twenty-five hundredths','two and seventy-five hundredths','twenty','one','one and a half','two','two and a half','three','ten','one','one and a half','two','two and a half','three'];
639
+
640
+
afterEach(destroyGraphDiv);
641
+
642
+
functionrun(spec){
643
+
gd=createGraphDiv();
644
+
645
+
vardata=(spec.traces||[{}]).map(function(t){
646
+
t.type='treemap';
647
+
t.text=text0;
648
+
t.values=values0;
649
+
t.level='Oscar';
650
+
t.branchvalues='total';
651
+
t.hovertemplate='path = %{currentPath}<br>label = %{label}<br>text = %{text}<br>value = %{value}<br>ratio to %{parent} = %{percentParent}<br>ratio to %{entry} = %{percentEntry}<br>ratio to %{root} = %{percentRoot}';
nums: 'path = Alpha/Charlie/Foxtrot/Juliet/\nlabel = Oscar\ntext = twenty\nvalue = 20\nratio to Juliet = 0.7142857142857143\nratio to Oscar = 1\nratio to Alpha = 0.5',
693
+
},
694
+
ptData: {
695
+
curveNumber: 0,
696
+
pointNumber: 14,
697
+
label: 'Oscar',
698
+
parent: 'Juliet'
699
+
}
700
+
}
701
+
},{
702
+
desc: 'leaf',
703
+
pos: 10,
704
+
exp: {
705
+
label: {
706
+
name: 'trace 0',
707
+
nums: 'path = Alpha/Charlie/Foxtrot/Juliet/Oscar/Uniform/\nlabel = X ray\ntext = two\nvalue = 2\nratio to Uniform = 0.2\nratio to Oscar = 0.1\nratio to Alpha = 0.05',
708
+
},
709
+
ptData: {
710
+
curveNumber: 0,
711
+
pointNumber: 23,
712
+
label: 'X ray',
713
+
parent: 'Uniform'
714
+
}
715
+
}
716
+
}]
717
+
.forEach(function(spec){
718
+
it('should generate correct hover labels and event data - '+spec.desc,function(done){
719
+
run(spec).catch(failTest).then(done);
720
+
});
721
+
});
722
+
});
723
+
724
+
describe('Test treemap hover at root level',function(){
vartext0=['forty','two','thirty-eight','one and a half','two and a half','thirty-four','one','two','three','twenty-eight','one and twenty-five hundredths','one and seventy-five hundredths','two and twenty-five hundredths','two and seventy-five hundredths','twenty','one','one and a half','two','two and a half','three','ten','one','one and a half','two','two and a half','three'];
731
+
732
+
afterEach(destroyGraphDiv);
733
+
734
+
functionrun(spec){
735
+
gd=createGraphDiv();
736
+
737
+
vardata=(spec.traces||[{}]).map(function(t){
738
+
t.type='treemap';
739
+
t.text=text0;
740
+
t.values=values0;
741
+
t.branchvalues='total';
742
+
t.hovertemplate='path = %{currentPath}<br>label = %{label}<br>text = %{text}<br>value = %{value}<br>ratio to %{parent} = %{percentParent}<br>ratio to %{entry} = %{percentEntry}<br>ratio to %{root} = %{percentRoot}';
0 commit comments