From 250ce678d004e74f752aec5096ae189817847f90 Mon Sep 17 00:00:00 2001 From: WhiteSaxo Date: Thu, 7 Mar 2019 00:29:48 +0100 Subject: [PATCH 1/2] Add files via upload --- src/line-chart.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/line-chart.js b/src/line-chart.js index 68d90197..6e177cc6 100644 --- a/src/line-chart.js +++ b/src/line-chart.js @@ -163,7 +163,7 @@ class LineChart extends AbstractChart { render() { const paddingTop = 16 const paddingRight = 64 - const { width, height, data, withShadow = true, withDots = true, withInnerLines = true, style = {}, decorator } = this.props + const { width, height, data, withShadow = true, withDots = true, withInnerLines = true, withOuterLines = true, style = {}, decorator } = this.props const { labels = [] } = data const { borderRadius = 0 } = style const config = { @@ -196,11 +196,13 @@ class LineChart extends AbstractChart { paddingTop, paddingRight }) - : this.renderHorizontalLine({ + : withOuterLines + ? this.renderHorizontalLine({ ...config, paddingTop, paddingRight }) + : null } @@ -221,11 +223,13 @@ class LineChart extends AbstractChart { paddingTop, paddingRight }) - : this.renderVerticalLine({ + : withOuterLines + ? this.renderVerticalLine({ ...config, paddingTop, paddingRight }) + : null } From f09affe0e4a7f184376c82b6ae88c607c84985a5 Mon Sep 17 00:00:00 2001 From: WhiteSaxo Date: Thu, 7 Mar 2019 00:32:18 +0100 Subject: [PATCH 2/2] Add files via upload --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5eab59ca..b72aaa3f 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ const data = { | withDots | boolean | Show dots on the line - default: True | | withShadow | boolean | Show shadow for line - default: True | | withInnerLines | boolean | Show inner dashed lines - default: True | +| withOuterLines | boolean | Show outer dashed lines - default: True | | chartConfig | Object | Configuration object for the chart, see example config object above | |decorator | Function | This function takes a [whole bunch](https://github.com/indiespirit/react-native-chart-kit/blob/master/src/line-chart.js#L266) of stuff and can render extra elements, such as data point info or additional markup. |