diff --git a/src/traces/treemap/style.js b/src/traces/treemap/style.js index 18803bb8a25..322cc00e6e4 100644 --- a/src/traces/treemap/style.js +++ b/src/traces/treemap/style.js @@ -47,8 +47,8 @@ function styleOne(s, pt, trace, opts) { lineColor = trace._hovered.marker.line.color; lineWidth = trace._hovered.marker.line.width; } else { - if(isRoot && fillColor === 'rgba(0,0,0,0)') { - opacity = 0; + if(isRoot && fillColor === trace.root.color) { + opacity = 100; lineColor = 'rgba(0,0,0,0)'; lineWidth = 0; } else { diff --git a/test/image/baselines/sunburst_inside-text-orientation_clock.png b/test/image/baselines/sunburst_inside-text-orientation_clock.png index 1216ae00c05..24bcfbf2481 100644 Binary files a/test/image/baselines/sunburst_inside-text-orientation_clock.png and b/test/image/baselines/sunburst_inside-text-orientation_clock.png differ diff --git a/test/image/baselines/treemap_textposition.png b/test/image/baselines/treemap_textposition.png index 82a137dc35b..9ae06f087a7 100644 Binary files a/test/image/baselines/treemap_textposition.png and b/test/image/baselines/treemap_textposition.png differ diff --git a/test/image/mocks/sunburst_inside-text-orientation_clock.json b/test/image/mocks/sunburst_inside-text-orientation_clock.json index a6d7312bbee..354c9b0d92f 100644 --- a/test/image/mocks/sunburst_inside-text-orientation_clock.json +++ b/test/image/mocks/sunburst_inside-text-orientation_clock.json @@ -4,6 +4,7 @@ "name": "horizontal", "insidetextorientation": "horizontal", "type": "sunburst", + "root": { "color": "yellow" }, "parents": [ "", "A", @@ -77,6 +78,7 @@ "name": "radial", "insidetextorientation": "radial", "type": "sunburst", + "root": { "color": "yellow" }, "parents": [ "", "A", @@ -150,6 +152,7 @@ "name": "tangential", "insidetextorientation": "tangential", "type": "sunburst", + "root": { "color": "yellow" }, "parents": [ "", "A", @@ -223,6 +226,7 @@ "name": "auto", "insidetextorientation": "auto", "type": "sunburst", + "root": { "color": "yellow" }, "parents": [ "", "A", diff --git a/test/image/mocks/treemap_textposition.json b/test/image/mocks/treemap_textposition.json index b946c74d9a6..b1cb4b2b186 100644 --- a/test/image/mocks/treemap_textposition.json +++ b/test/image/mocks/treemap_textposition.json @@ -2,6 +2,7 @@ "data": [ { "type": "treemap", + "root": { "color": "yellow" }, "textinfo": "label+text+percent parent+percent entry+percent root", "name": "bottom left textposition", "textposition": "bottom left", @@ -110,6 +111,7 @@ }, { "type": "treemap", + "root": { "color": "yellow" }, "textinfo": "label+text+percent parent+percent entry+percent root", "name": "bottom center textposition", "textposition": "bottom center", @@ -219,6 +221,7 @@ }, { "type": "treemap", + "root": { "color": "yellow" }, "textinfo": "label+text+percent parent+percent entry+percent root", "name": "bottom right textposition", "textposition": "bottom right", @@ -330,6 +333,7 @@ }, { "type": "treemap", + "root": { "color": "yellow" }, "textinfo": "label+text+percent parent+percent entry+percent root", "name": "middle left textposition", "textposition": "middle left", @@ -436,6 +440,7 @@ }, { "type": "treemap", + "root": { "color": "yellow" }, "textinfo": "label+text+percent parent+percent entry+percent root", "name": "middle center textposition", "textposition": "middle center", @@ -543,6 +548,7 @@ }, { "type": "treemap", + "root": { "color": "yellow" }, "textinfo": "label+text+percent parent+percent entry+percent root", "name": "middle right textposition", "textposition": "middle right", @@ -649,6 +655,7 @@ }, { "type": "treemap", + "root": { "color": "yellow" }, "textinfo": "label+text+percent parent+percent entry+percent root", "name": "top left textposition", "textposition": "top left", @@ -759,6 +766,7 @@ }, { "type": "treemap", + "root": { "color": "yellow" }, "textinfo": "label+text+percent parent+percent entry+percent root", "name": "top center textposition", "textposition": "top center", @@ -869,6 +877,7 @@ }, { "type": "treemap", + "root": { "color": "yellow" }, "textinfo": "label+text+percent parent+percent entry+percent root", "name": "top right textposition", "textposition": "top right",