Commit 22d740c8 authored by tom's avatar tom

change spline type to curveMonotoneX

parent 7bdeebd7
...@@ -41,7 +41,7 @@ const ChartArea = ({ id, xScale, yScale, color, data, disableAnimation, ...props ...@@ -41,7 +41,7 @@ const ChartArea = ({ id, xScale, yScale, color, data, disableAnimation, ...props
.x(({ date }) => xScale(date)) .x(({ date }) => xScale(date))
.y1(({ value }) => yScale(value)) .y1(({ value }) => yScale(value))
.y0(() => yScale(yScale.domain()[0])) .y0(() => yScale(yScale.domain()[0]))
.curve(d3.curveCatmullRom); .curve(d3.curveMonotoneX);
return area(data) || undefined; return area(data) || undefined;
}, [ xScale, yScale, data ]); }, [ xScale, yScale, data ]);
......
...@@ -62,7 +62,7 @@ const ChartLine = ({ xScale, yScale, data, animation, ...props }: Props) => { ...@@ -62,7 +62,7 @@ const ChartLine = ({ xScale, yScale, data, animation, ...props }: Props) => {
const line = d3.line<TimeChartItem>() const line = d3.line<TimeChartItem>()
.x((d) => xScale(d.date)) .x((d) => xScale(d.date))
.y((d) => yScale(d.value)) .y((d) => yScale(d.value))
.curve(d3.curveCatmullRom); .curve(d3.curveMonotoneX);
return ( return (
<path <path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment