在尊重曲线边界的 d3js 中,在单流流图的最大值处绘制垂直带?

Draw a vertical band at the maximum value of a single-stream streamgraph in d3js that respects the bounds of curve?

问题:我们如何在尊重曲线边界的 d3js 中的单流流图的最大值处绘制垂直带?

editable streamgraph example.

假设这是原始流图: 问题集中在我们如何创建这样的东西:

以下解决方案使用@GerardoFurtado 的初始想法,但添加了一个 clipPath 以遵守任何带宽的曲线边界:

https://beta.observablehq.com/@blehman/untitled/2