diff --git a/README.md b/README.md index 94fd8455..c82856ce 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,9 @@ class AreaChartExample extends React.PureComponent { #### Props See [Common Props](#common-props) +| Property | Default | Description | +| --- | --- | --- | +| renderLineGradient | undefined | The same as `renderGradient` but for the line in the chart | ### StackedAreaChart diff --git a/package.json b/package.json index 2b8c1699..2c768561 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-svg-charts", - "version": "2.2.0", + "version": "2.2.1", "private": false, "description": "Customizable charts (Line, Bar, Area, Pie, Circle, Waterfall, Progress) for React Native", "main": "src/index.js", diff --git a/src/area-chart.js b/src/area-chart.js index e6fbab4e..4073ebff 100644 --- a/src/area-chart.js +++ b/src/area-chart.js @@ -28,6 +28,7 @@ class AreaChart extends PureComponent { animationDuration, style, renderGradient, + renderLineGradient, curve, showGrid, numberOfTicks, @@ -102,6 +103,7 @@ class AreaChart extends PureComponent { { showGrid && renderGrid({ x, y, ticks, dataPoints, gridProps }) } { renderGradient && renderGradient({ id: 'gradient', width, height, x, y }) } + { renderLineGradient && renderLineGradient({ id: 'line-gradient', width, height, x, y }) } ) } + renderLineGradient={ ({ id }) => ( + + + + + ) } /> ) }