File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,7 @@ See [Common Props](#common-props)
141
141
| Property | Default | Description |
142
142
| --- | --- | --- |
143
143
| renderLineGradient | undefined | The same as ` renderGradient ` but for the line in the chart |
144
+ | start | 0 | The value of which the area should start (will always end on the data point) |
144
145
145
146
### StackedAreaChart
146
147
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ class AreaChart extends PureComponent {
24
24
25
25
const {
26
26
dataPoints,
27
+ start,
27
28
animate,
28
29
animationDuration,
29
30
style,
@@ -72,7 +73,7 @@ class AreaChart extends PureComponent {
72
73
73
74
const area = shape . area ( )
74
75
. x ( ( d , index ) => x ( index ) )
75
- . y0 ( y ( 0 ) )
76
+ . y0 ( y ( start ) || y ( 0 ) )
76
77
. y1 ( d => y ( d ) )
77
78
. defined ( value => typeof value === 'number' )
78
79
. curve ( curve )
@@ -156,6 +157,7 @@ AreaChart.propTypes = {
156
157
renderLineGradient : PropTypes . func ,
157
158
curve : PropTypes . func ,
158
159
renderGrid : PropTypes . func ,
160
+ start : PropTypes . number ,
159
161
}
160
162
161
163
AreaChart . defaultProps = {
You can’t perform that action at this time.
0 commit comments