File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -523,9 +523,9 @@ function computeShapedParts<D extends FunnelDatum>(
523523 partHeight = ( datum . value / totalValue ) * innerHeight
524524 y0 = currentHeight
525525 y1 = y0 + partHeight
526- const inBottomThird = y0 > neckHeight
527526
528- partWidth = inBottomThird
527+ const inNeck = neckHeightRatio >= 1 || y0 > neckHeight
528+ partWidth = inNeck
529529 ? neckWidth
530530 : innerWidth - 2 * ( Math . round ( ( currentHeight / slope ) * 10 ) / 10 )
531531 x0 = paddingBefore + ( innerWidth - partWidth ) * 0.5
@@ -535,9 +535,9 @@ function computeShapedParts<D extends FunnelDatum>(
535535 partWidth = ( datum . value / totalValue ) * innerWidth
536536 x0 = currentWidth
537537 x1 = x0 + partWidth
538- const inLastThird = x0 > neckHeight
539538
540- partHeight = inLastThird
539+ const inNeck = neckHeightRatio >= 1 || x0 > neckHeight
540+ partHeight = inNeck
541541 ? neckWidth
542542 : innerHeight - 2 * ( Math . round ( ( currentWidth / slope ) * 10 ) / 10 )
543543 y0 = paddingBefore + ( innerHeight - partHeight ) * 0.5
You can’t perform that action at this time.
0 commit comments