-
Hi, I'm trying to follow the suggestion in #1399 (comment) to get an area chart with only stroke on the top. When I add the line path element (above or below AreaClosed) the AreaClosed seems to break. Any suggestions? New user here! https://codesandbox.io/s/wonderful-archimedes-48fbr?file=/Example.tsx (if the code doesn't load, all I did was fork the AreaClosed example, and add LinePath in addition to AreaClosed like so:)
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
HI @moon-sam, just need to remove the fill on the <AreaClosed<AppleStock>
data={stock}
x={(d) => dateScale(getDate(d)) ?? 0}
y={(d) => stockValueScale(getStockValue(d)) ?? 0}
yScale={stockValueScale}
fill="url(#area-gradient)"
curve={curveMonotoneX}
/>
<LinePath<AppleStock>
data={stock}
x={(d) => dateScale(getDate(d)) ?? 0}
y={(d) => stockValueScale(getStockValue(d)) ?? 0}
strokeWidth={3}
stroke="blue"
curve={curveMonotoneX}
/> https://codesandbox.io/s/async-sun-hsmsv?file=/Example.tsx:4306-4899 |
Beta Was this translation helpful? Give feedback.
HI @moon-sam, just need to remove the fill on the
<LinePath />
:https://codesandbox.io/s/async-sun-hsmsv?file=/Example.tsx:4306-4899