Skip to content

Commit d00383a

Browse files
fix(partition): correct the calculation for the new width of the d3 partition object
1 parent 575f3c1 commit d00383a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/traces/icicle/partition.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ module.exports = function partition(entry, size, opts) {
88
var swapXY = opts.orientation === 'h';
99
var maxDepth = opts.maxDepth;
1010

11-
// calculate partion size
12-
var newWidth = (entry.height + 1) * size[0] / Math.min(entry.height, maxDepth);
11+
var newWidth = (entry.height + 1) * size[0] / Math.min(entry.height+1, maxDepth);
1312

1413
var result = d3Hierarchy
1514
.partition()

0 commit comments

Comments
 (0)