Skip to content

Commit 1d159e6

Browse files
committed
display treemap root with opacity 1
- also update the treemap baseline which now fails both locally and on the CI
1 parent ba492cf commit 1d159e6

File tree

6 files changed

+824
-9
lines changed

6 files changed

+824
-9
lines changed

src/traces/treemap/attributes.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,9 @@ module.exports = {
147147
max: 1,
148148
dflt: 0.5,
149149
description: [
150-
'Sets the base opacity of the headers based on the depth from the entry.',
151-
'This options is not available when having a `colorscale`.'
150+
'Sets the base opacity of the headers above root based on the depth from the entry.',
151+
'Please note that the root itself would be drawn with opacity 1.',
152+
'This options is not available when having a `colorscale`.',
152153
].join(' ')
153154
},
154155

src/traces/treemap/style.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ function styleOne(s, pt, trace, opts) {
6161
opacity =
6262
trace._hasColorscale || helpers.isLeaf(pt) ? 1 :
6363
pt.onPathbar ? trace.pathbar.opacity :
64-
depthFade(pt.data.depth - trace._entryDepth);
64+
helpers.isHierarchyRoot(pt) ? 1 :
65+
depthFade(pt.data.depth - trace._entryDepth);
6566
}
6667

6768
s.style('stroke-width', lineWidth)
Loading
93 Bytes
Loading

0 commit comments

Comments
 (0)