Skip to content
Draft
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
278 commits
Select commit Hold shift + click to select a range
d197961
1.1.3
Hermanya Jul 6, 2018
b14c238
fix the package main
Hermanya Jul 6, 2018
2618e71
1.1.4
Hermanya Jul 6, 2018
465572f
Multiple Lines on Graph Functionality (#24)
mrfambo Jul 12, 2018
3b6a509
1.1.5
Hermanya Jul 12, 2018
bef949a
Can modify color and font styling in each Pie at Pie-Chart (#32)
geoseong Aug 11, 2018
3ab1f05
Update package.json
Hermanya Aug 15, 2018
e104e60
Temporary fix for paths-js (#36)
patrykwegrzyn Aug 22, 2018
b124084
1.1.6
Hermanya Aug 22, 2018
c6c4183
Added optional decimal point formatting for Y Axis (#47)
antcocking Sep 21, 2018
396f768
mistyped backgroundcolor property at Pie-Chart. (#40)
geoseong Sep 23, 2018
f184db4
Merge branch 'master' of https://github.com/indiespirit/react-native-…
Hermanya Sep 29, 2018
770dea1
1.1.7
Hermanya Sep 29, 2018
f4b9a48
fix NaN label when all values are the same (#50)
idw111 Oct 2, 2018
1093edd
fix: use react native svg (#52)
iyolee Oct 13, 2018
484be47
1.1.8
Hermanya Oct 13, 2018
fc1c38d
fixed the issue of bar height when all data are 0
daniel0128 Nov 1, 2018
4dae63e
Merge pull request #58 from daniel0128/master
olegberman Nov 1, 2018
734da75
Merge branch 'master' of https://github.com/indiespirit/react-native-…
Hermanya Nov 5, 2018
6819266
include react-native-svg in dev deps
Hermanya Nov 5, 2018
ff79df5
The decimalPlaces property was not fixed, rather the hardcoded 2 was …
tkayfun Nov 13, 2018
5e21a8c
1.2.0
Hermanya Nov 13, 2018
563ca99
Hi this resolves an issue # 65 (#66)
omer-waheed Nov 27, 2018
378421f
1.2.1
Hermanya Nov 27, 2018
383c255
fix for #63
murray1337 Jan 8, 2019
dde1182
Merge pull request #71 from MarcelBlockchain/patch-1
olegberman Jan 10, 2019
9d72aec
allow the color per dataset customization for line chart
Hermanya Jan 15, 2019
9fbaf60
1.2.2
Hermanya Jan 15, 2019
cb81ad6
update deps
Hermanya Jan 19, 2019
6070175
group rendered children
Hermanya Jan 19, 2019
785fc4a
2.0.0
Hermanya Jan 19, 2019
00c8135
remove babel-polyfill from dependencies
Hermanya Jan 20, 2019
1d9fa2d
2.0.1
Hermanya Jan 20, 2019
76f55a0
Added without inner lines prop for line chart (#77)
gish94 Feb 9, 2019
4d46d27
withoutInnerLines -> withInnerLines for consistency
Hermanya Feb 9, 2019
c9ad923
2.1.0
Hermanya Feb 9, 2019
7fd162a
[fix] Y labels value for multi lines (#79)
OlexandrPadura Feb 13, 2019
d42326b
Added strokeWidth property for line chart datasets. (#78)
gish94 Feb 13, 2019
044b98d
Feature/custom decorator (#80)
OlexandrPadura Feb 14, 2019
9293da2
update readme
Hermanya Feb 14, 2019
3ee4600
2.2.0
Hermanya Feb 14, 2019
cc551e5
[fix] display Y value for multi lines with one dot (#81)
OlexandrPadura Feb 14, 2019
c7c3b26
2.2.1
Hermanya Feb 14, 2019
38d8d47
Value tooltip when clicked (#84)
leomorini Mar 7, 2019
95e5125
Added withOuterLines prop for line chart (#85)
WhiteSaxo Mar 7, 2019
4f0bce3
2.3.0
Hermanya Mar 10, 2019
3dce1a8
Added property 'absolute' to Pie Chart (#94)
M0W93 Mar 22, 2019
09b8084
1) Add yAxisLabel prop to prepend text to horizontal labels. (#97)
brennedith Mar 23, 2019
078b5ff
minor fixes
Hermanya Mar 23, 2019
bc2b548
2.4.0
Hermanya Mar 23, 2019
9136323
Fix PieChart to be able to be rendered (#100)
k-yokoishi Mar 31, 2019
d9cdf8e
New StackedBarChart (#98)
M0W93 Apr 1, 2019
49eea87
Fix BarChart that has negative value (#101)
k-yokoishi Apr 13, 2019
d8cf6d7
2.4.1
Hermanya Apr 13, 2019
0334b7c
2.5.0
Hermanya Apr 13, 2019
f259273
Draw BarChart and LineChart from 0 (#107)
k-yokoishi Apr 25, 2019
91badc3
fix negative bar chart bars
Hermanya Apr 25, 2019
a83d75e
2.6.0
Hermanya Apr 25, 2019
3e1a24f
Update abstract-chart.js
Hermanya May 3, 2019
e20c2ea
2.6.1
Hermanya May 4, 2019
f276da9
Added index.d.ts for tsx(typescript) (#120)
hirasaki1985 Jun 13, 2019
1d58773
Merge branch 'master' of github.com:indiespirit/react-native-chart-kit
Hermanya Jun 13, 2019
627c837
3.0.0
Hermanya Jun 13, 2019
f99f651
add changelog
Hermanya Jun 13, 2019
5daa854
Line graph on press fix (#129)
miwialex Jul 6, 2019
78f30d2
3.0.1
Hermanya Jul 6, 2019
401b1b5
Hide Horizontal and Vertical Labels (#135)
rockorama Jul 18, 2019
b134508
update changelog
Hermanya Jul 18, 2019
43cf6c3
3.1.0
Hermanya Jul 18, 2019
4e440ba
Add labels to progress chart (#138)
wvanvlaenderen Jul 28, 2019
b139349
3.2.0
Hermanya Jul 28, 2019
6b2131c
Fixes Pie Charts with empty values and single slice (#89) (#141)
paulomoreno Aug 9, 2019
db7fc07
3.2.1
Hermanya Aug 9, 2019
4171a87
add index of the point clicked (#151)
MD1990 Sep 3, 2019
02d2208
clean up white space
Hermanya Sep 3, 2019
350f134
3.3.0
Hermanya Sep 3, 2019
0b4467a
update changelog
Hermanya Sep 3, 2019
9c139f5
fixes dots + fromZero (#152)
kimspiess Sep 4, 2019
4e1b162
3.3.1
Hermanya Sep 4, 2019
e440d33
Added background opacity props (#163)
cleybertandre Sep 22, 2019
2006a3f
update dev dependencies
Hermanya Sep 22, 2019
78b1d1f
3.4.0
Hermanya Sep 22, 2019
ffc7bea
update changelog
Hermanya Sep 22, 2019
94ad315
Enables horizontal and vertical label rotations (#164)
stephenc222 Sep 24, 2019
997b9d8
3.5.0
Hermanya Sep 24, 2019
24ac356
adds bar chart label rotations (#166)
stephenc222 Sep 24, 2019
00d0ccf
Adds dot color callback prop (#167)
stephenc222 Sep 24, 2019
e03b6bf
rename dotColor to getDotColor
Hermanya Sep 24, 2019
fcd4c22
update ts types
Hermanya Sep 24, 2019
2c98031
Add barPercentage property to chartConfig (#168)
dchirutac Sep 25, 2019
c5258a1
Add barPercentage property to chartConfig (#169)
dchirutac Sep 25, 2019
0c9e0dc
update changelog
Hermanya Sep 25, 2019
b111e3d
3.6.0
Hermanya Sep 25, 2019
29403ce
Merge branch 'master' of github.com:indiespirit/react-native-chart-kit
Hermanya Sep 25, 2019
e96298a
3.6.1
Hermanya Sep 25, 2019
fe5aca9
fixes for showing or not showing the legend in the pie chart (#171)
raushanji Sep 28, 2019
d4c9b2a
add prettier and eslint
Hermanya Sep 28, 2019
828fe6e
wip
Hermanya Sep 28, 2019
d8d14ab
fix lint
Hermanya Sep 29, 2019
512125c
withSolidLine can be passed as true to remove dash line in chart (#177)
anshulsingh2403 Oct 9, 2019
50761b9
Insert paddingtop and right (#175)
erickhaendel Oct 9, 2019
cafa146
update changelog
Hermanya Oct 9, 2019
61bd054
3.7.0
Hermanya Oct 9, 2019
36d3cd6
Added dot cx, cy in the onDataPointClick functions arguments & fixes …
rishab1065 Oct 11, 2019
0d112e7
Merge branch 'master' of github.com:indiespirit/react-native-chart-kit
Hermanya Oct 11, 2019
5f4098a
update changelog
Hermanya Oct 11, 2019
b2c3a93
3.8.0
Hermanya Oct 11, 2019
21074f0
Create labelColor prop within AbstractChart class for separate label/…
Oct 11, 2019
2cbb6bf
Add missing comma (#184)
Oct 11, 2019
9e68bf3
Added props config for Dots in the line chart (#183)
rishab1065 Oct 12, 2019
79dd411
feat: dd type for chart config (#186)
karszawa Oct 13, 2019
178af29
docs: fix-sample chart config (#185)
karszawa Oct 13, 2019
8591934
udpate changelog
Hermanya Oct 11, 2019
fcbb596
3.9.0
Hermanya Oct 11, 2019
3f32d9f
update changelog
Hermanya Oct 13, 2019
6a853da
3.10.0
Hermanya Oct 13, 2019
2a91187
add missing comma (#199)
futantan Oct 23, 2019
26e5fae
Line Graph Fix (#189)
rishab1065 Oct 26, 2019
8313537
BarChart - added 'withInnerLines' property (#191)
Aleksandern Oct 26, 2019
18646af
Add yAxisSuffix (#196)
ben-toogood Oct 26, 2019
752c756
update changelog
Hermanya Oct 26, 2019
e2b6ac0
ability to change 'fillShadowGradient' color and 'fillShadowGradient'…
Aleksandern Oct 26, 2019
1413e54
Merge branch 'master' of github.com:indiespirit/react-native-chart-kit
Hermanya Oct 26, 2019
e20dbf4
update changelog
Hermanya Oct 26, 2019
c05ffff
3.11.0
Hermanya Oct 26, 2019
62e1d14
Update README.md
Hermanya Oct 26, 2019
e39d8b6
Update README.md
Hermanya Oct 26, 2019
dafbf82
Pass format function to Y and X labels (#214)
vitorverasm Nov 16, 2019
b320938
update example app and changelog
Hermanya Nov 16, 2019
b70f8fc
Merge branch 'master' of github.com:indiespirit/react-native-chart-kit
Hermanya Nov 16, 2019
66520a4
Added getDotProps prop for line chart (#206)
rishab1065 Nov 16, 2019
7b5f4aa
Merge branch 'master' of github.com:indiespirit/react-native-chart-kit
Hermanya Nov 16, 2019
707ce25
update docs, types and changelog
Hermanya Nov 16, 2019
582b611
3.12.0
Hermanya Nov 16, 2019
d061a9c
3.13.0
Hermanya Nov 17, 2019
d3a265f
Bump morgan from 1.9.0 to 1.9.1 (#222)
dependabot[bot] Nov 24, 2019
e7a51bf
Bump fstream from 1.0.11 to 1.0.12 (#221)
dependabot[bot] Nov 24, 2019
ad9f1ae
Bump sshpk from 1.13.1 to 1.16.1 (#220)
dependabot[bot] Nov 24, 2019
e56a17b
Bump mixin-deep from 1.3.1 to 1.3.2 (#219)
dependabot[bot] Nov 24, 2019
883db38
Bump merge from 1.2.0 to 1.2.1 (#218)
dependabot[bot] Nov 24, 2019
a5227c7
Bump handlebars from 4.0.11 to 4.5.2 (#217)
dependabot[bot] Nov 24, 2019
ac5ec95
Bump extend from 3.0.1 to 3.0.2 (#216)
dependabot[bot] Nov 24, 2019
8e08740
Bump lodash from 4.17.11 to 4.17.13 (#215)
dependabot[bot] Nov 24, 2019
9f836b5
Bump js-yaml from 3.10.0 to 3.13.1 (#202)
dependabot[bot] Nov 24, 2019
fe7313b
Bump stringstream from 0.0.5 to 0.0.6 (#229)
dependabot[bot] Nov 24, 2019
182bca9
Bump diff from 3.4.0 to 3.5.0 (#230)
dependabot[bot] Nov 24, 2019
88e0c84
Adds ProgressChartData type (#223)
Nov 24, 2019
bc94b89
update changelog
Hermanya Nov 24, 2019
7eb140e
Adds item index to color call (#224)
Nov 24, 2019
a36c054
Merge branch 'master' of github.com:indiespirit/react-native-chart-kit
Hermanya Nov 24, 2019
c94b74b
Fix SVG height (#225)
rishab1065 Nov 24, 2019
e61395c
Merge branch 'master' of github.com:indiespirit/react-native-chart-kit
Hermanya Nov 24, 2019
7ca1312
update changelog
Hermanya Nov 24, 2019
c01e64c
Line chart data type (#227)
Charanor Nov 24, 2019
7d71326
Merge branch 'master' of github.com:indiespirit/react-native-chart-kit
Hermanya Nov 24, 2019
21ffbec
update changelog
Hermanya Nov 24, 2019
2f25948
fix: line-chart & progress-chart wrong width calculation (#209)
Rapsssito Nov 24, 2019
52fe591
Merge branch 'master' of github.com:indiespirit/react-native-chart-kit
Hermanya Nov 24, 2019
9f87124
update changelog
Hermanya Nov 24, 2019
a853a04
4.0.0
Hermanya Nov 24, 2019
9a750c4
Add hideLegend option to ProgressChart (#232)
curtismenmuir Dec 1, 2019
e093aca
4.1.0
Hermanya Dec 1, 2019
e93a3c4
Feature/line chart supports legend (#239)
SimonPringleWallace Dec 16, 2019
35dc689
update changelog
Hermanya Dec 16, 2019
aa741c7
4.2.0
Hermanya Dec 16, 2019
a084c12
Dot content (#243)
rishab1065 Dec 22, 2019
a39b47b
Add some configs to StackedBarChart (#242)
israelouteiro Dec 22, 2019
407b1f1
4.3.0
Hermanya Dec 22, 2019
178c1f1
update changelog
Hermanya Dec 22, 2019
045a863
fix: link to decorator config (#246)
i1skn Dec 23, 2019
9b351e2
Correct Readme errors (#252)
assetcorp Jan 5, 2020
89f24ad
Ability to add custom segments on the Y-Axis (#253)
alexandargyurov Jan 14, 2020
22073aa
barRadius chart config for BarChart (#248)
Jan 14, 2020
797f2bd
update changelog
Hermanya Jan 14, 2020
a968751
4.4.0
Hermanya Jan 14, 2020
c917e43
Fix LineChart's decimalPlaces prop (#256)
dusty-commits Jan 16, 2020
ad731b0
4.4.1
Hermanya Jan 16, 2020
c7a301f
fix: Remove .babelrc from npm package (#263)
Rapsssito Feb 5, 2020
c396e5f
make decimalPlaces work for StackedBar Chart (#269)
IsmaelMiber Feb 5, 2020
8a28699
4.5.0
Hermanya Feb 5, 2020
fd94dbf
update changelog
Hermanya Feb 5, 2020
6dec211
Improved the way ContributionGraph computes color opacity: now it is …
artus9033 Feb 19, 2020
05d5069
Added getMonthLabel to ContributionGraph (#276)
artus9033 Feb 19, 2020
60c7be2
update changelog
Hermanya Feb 19, 2020
5844596
Add `yAxisInterval` props (#274)
ulayab Feb 19, 2020
a3b8cc3
Merge branch 'master' of github.com:indiespirit/react-native-chart-kit
Hermanya Feb 19, 2020
0a0cb52
update changelog
Hermanya Feb 19, 2020
d79f1cf
Make stacked bar expaned (#272)
IsmaelMiber Feb 19, 2020
cd13ea1
update changelog
Hermanya Feb 19, 2020
b67241f
5.0.0
Hermanya Feb 19, 2020
c64835e
Added a withDots property to each dataset in LineChart to disable (#281)
artus9033 Feb 23, 2020
c64ed20
ContributionGraph onDayPress implementation (#280)
artus9033 Feb 23, 2020
99d649a
update changelog
Hermanya Feb 23, 2020
e9e9b27
5.1.0
Hermanya Feb 23, 2020
5e7cec8
Fix bug of barchart configuration about barRadius, formatYLabel & for…
Feb 25, 2020
ace4f6a
Update changelog
Hermanya Feb 25, 2020
ce49ffc
5.1.1
Hermanya Feb 25, 2020
8f71624
propsForDots added to ChartConfig interface (#286)
serayuzgur Mar 15, 2020
a8cfbd2
5.2.0
Hermanya Mar 15, 2020
823c68b
Update changelog
Hermanya Mar 15, 2020
5c3e56c
feat(LineChart): add scrollable Line Chart (#294)
FallenDestiny Mar 31, 2020
c456946
ContributionGraph cleanup (#296)
lafiosca Mar 31, 2020
cb26cf6
Update changelog
Hermanya Mar 31, 2020
8e84584
5.3.0
Hermanya Mar 31, 2020
5fe17ef
types fixes (#304)
enniel Apr 10, 2020
6f8643a
5.3.1
Hermanya Apr 10, 2020
e3b5864
Update changelog
Hermanya Apr 10, 2020
4805478
added strokeWidth & radius as params for progress chart (#310)
mateusarbex Apr 15, 2020
7ec049f
update changelog
Hermanya Apr 15, 2020
e196832
5.4.0
Hermanya Apr 15, 2020
10ab03c
Fixed decimalPlaces not being sent with barChart (#312)
Avery246813579 Apr 24, 2020
b779297
5.4.1
Hermanya Apr 24, 2020
75fa081
fix syntax error (#322)
JBaczuk Apr 25, 2020
aa4e163
5.4.2
Hermanya Apr 25, 2020
676c5cd
Add useShadowColorFromDataset param to the chartConfig (#320)
FonDorn Apr 25, 2020
8530e7b
Update changelog
Hermanya Apr 25, 2020
a387742
5.5.0
Hermanya Apr 25, 2020
35dc1b3
Fixed logic when decimalPlaces is 0 (#330)
ypereirars May 22, 2020
5ca27ae
added prop for showing value above bar (#325)
jorgnyg May 22, 2020
8170d76
Update changelog
Hermanya May 22, 2020
99adb83
5.6.0
Hermanya May 22, 2020
166c218
Merge branch 'master' of github.com:indiespirit/react-native-chart-kit
Hermanya Jun 7, 2020
58f9f9a
Fix linear gradient issue due to `react-native-svg` lib update
aboveyunhai Jun 9, 2020
7f863ba
Update to Expo SDK 37 and add clarification on usage to README.md (#343)
sreuter Jun 13, 2020
66d5afd
Fix linear gradient issue due to `react-native-svg` lib update (#348)
aboveyunhai Jun 13, 2020
48565a2
Merge branch 'master' of github.com:indiespirit/react-native-chart-kit
Hermanya Jun 13, 2020
251a92a
Add handling for datasets data is null to use last line coordinates (…
a7urag Jun 13, 2020
bcf28da
5.6.1
Hermanya Jun 13, 2020
feae834
Update changelog
Hermanya Jun 13, 2020
82b71a3
reimplement core chart, support bar-chart for full dynamic sizes
aboveyunhai Jun 15, 2020
162e676
Merge pull request #1 from aboveyunhai/dynamic-chart-size
aboveyunhai Jun 15, 2020
a82b7b8
Update README.ME for chartStyle
aboveyunhai Jun 15, 2020
7fad3a7
re-invent heatmap to fully dynamy and layout-control
aboveyunhai Jun 16, 2020
780a7f8
Merge pull request #2 from aboveyunhai/dynamic-chart-size
aboveyunhai Jun 16, 2020
ecd718d
Update README.md
aboveyunhai Jun 16, 2020
1e2c5b5
fully responsive support for line-chart, All padding includes.
aboveyunhai Jun 23, 2020
9be8679
Add tooltip to contribution chart onPressIn and onPressOut
aboveyunhai Jun 23, 2020
17001b0
Merge and fix conflicts
aboveyunhai Jun 23, 2020
d32fa5a
Merge pull request #3 from aboveyunhai/dynamic-chart-size
aboveyunhai Jun 23, 2020
1be57b2
Update abstract-chart compatibility for line-chart, shift default GRA…
aboveyunhai Jun 23, 2020
f093150
Merge pull request #4 from aboveyunhai/dynamic-chart-size
aboveyunhai Jun 23, 2020
49ed337
Fix: correct midpoint for BarChart labels
aboveyunhai Jun 23, 2020
5ce937b
Merge pull request #5 from aboveyunhai/dynamic-chart-size
aboveyunhai Jun 23, 2020
5910ef6
Fix: did not update when data changes
aboveyunhai Jul 6, 2020
5c70620
Merge pull request #6 from aboveyunhai/dynamic-chart-size
aboveyunhai Jul 6, 2020
bfb53c8
correct data display on scrollableInfo
aboveyunhai Jul 7, 2020
5c4fd0f
Merge pull request #7 from aboveyunhai/dynamic-chart-size
aboveyunhai Jul 7, 2020
6caba94
seperate hideLabel from hidePointsArIndex. correct vertical line hieg…
aboveyunhai Jul 23, 2020
8e540f4
Merge pull request #8 from aboveyunhai/dynamic-chart-size
aboveyunhai Jul 23, 2020
3cd41b8
Update index.d.ts
aboveyunhai Jul 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"presets": ["babel-preset-expo"],
"env": {
"development": {
"plugins": ["transform-react-jsx-source"]
}
}
"presets": ["babel-preset-expo"]
}
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "react-app"
}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
node_modules/
.expo/
.DS_Store
npm-debug.*
package-lock.json
.idea
.vscode
yarn.lock
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/
.expo/
npm-debug.*
/promo
.babelrc
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
226 changes: 177 additions & 49 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,106 +1,119 @@
import React from 'react'
import { ScrollView, StatusBar, Dimensions, Text } from 'react-native'
import ScrollableTabView from 'react-native-scrollable-tab-view'
import LineChart from './src/line-chart'
import PieChart from './src/pie-chart'
import ProgressChart from './src/progress-chart'
import BarChart from './src/bar-chart'
import ContributionGraph from './src/contribution-graph'
import { data, contributionData, pieChartData, progressChartData } from './data'
import 'babel-polyfill'
import "babel-polyfill";
import React from "react";
import { ScrollView, StatusBar, Dimensions, Text } from "react-native";
import ScrollableTabView from "react-native-scrollable-tab-view";
import FlashMessage, { showMessage } from "react-native-flash-message";
import LineChart from "./src/line-chart";
import PieChart from "./src/pie-chart";
import ProgressChart from "./src/progress-chart";
import BarChart from "./src/bar-chart";
import StackedBarChart from "./src/stackedbar-chart";
import ContributionGraph from "./src/contribution-graph";
import {
data,
contributionData,
pieChartData,
progressChartData,
stackedBarGraphData
} from "./data";

// in Expo - swipe left to see the following styling, or create your own
const chartConfigs = [
{
backgroundColor: '#000000',
backgroundGradientFrom: '#1E2923',
backgroundGradientTo: '#08130D',
backgroundColor: "#000000",
backgroundGradientFrom: "#1E2923",
backgroundGradientTo: "#08130D",
color: (opacity = 1) => `rgba(26, 255, 146, ${opacity})`,
style: {
borderRadius: 16
}
},
{
backgroundColor: '#022173',
backgroundGradientFrom: '#022173',
backgroundGradientTo: '#1b3fa0',
backgroundColor: "#022173",
backgroundGradientFrom: "#022173",
backgroundGradientTo: "#1b3fa0",
color: (opacity = 1) => `rgba(255, 255, 255, ${opacity})`,
style: {
borderRadius: 16
},
propsForBackgroundLines: {
strokeDasharray: "" // solid background lines with no dashes
}
},
{
backgroundColor: '#ffffff',
backgroundGradientFrom: '#ffffff',
backgroundGradientTo: '#ffffff',
backgroundColor: "#ffffff",
backgroundGradientFrom: "#ffffff",
backgroundGradientTo: "#ffffff",
color: (opacity = 1) => `rgba(0, 0, 0, ${opacity})`
},
{
backgroundColor: '#26872a',
backgroundGradientFrom: '#43a047',
backgroundGradientTo: '#66bb6a',
backgroundColor: "#26872a",
backgroundGradientFrom: "#43a047",
backgroundGradientTo: "#66bb6a",
color: (opacity = 1) => `rgba(255, 255, 255, ${opacity})`,
style: {
borderRadius: 16
}
},
{
backgroundColor: '#000000',
backgroundGradientFrom: '#000000',
backgroundGradientTo: '#000000',
backgroundColor: "#000000",
backgroundGradientFrom: "#000000",
backgroundGradientTo: "#000000",
color: (opacity = 1) => `rgba(${255}, ${255}, ${255}, ${opacity})`
}, {
backgroundColor: '#0091EA',
backgroundGradientFrom: '#0091EA',
backgroundGradientTo: '#0091EA',
},
{
backgroundColor: "#0091EA",
backgroundGradientFrom: "#0091EA",
backgroundGradientTo: "#0091EA",
color: (opacity = 1) => `rgba(${255}, ${255}, ${255}, ${opacity})`
},
{
backgroundColor: '#e26a00',
backgroundGradientFrom: '#fb8c00',
backgroundGradientTo: '#ffa726',
backgroundColor: "#e26a00",
backgroundGradientFrom: "#fb8c00",
backgroundGradientTo: "#ffa726",
color: (opacity = 1) => `rgba(255, 255, 255, ${opacity})`,
style: {
borderRadius: 16
}
},
{
backgroundColor: '#b90602',
backgroundGradientFrom: '#e53935',
backgroundGradientTo: '#ef5350',
backgroundColor: "#b90602",
backgroundGradientFrom: "#e53935",
backgroundGradientTo: "#ef5350",
color: (opacity = 1) => `rgba(255, 255, 255, ${opacity})`,
style: {
borderRadius: 16
}
},
{
backgroundColor: '#ff3e03',
backgroundGradientFrom: '#ff3e03',
backgroundGradientTo: '#ff3e03',
backgroundColor: "#ff3e03",
backgroundGradientFrom: "#ff3e03",
backgroundGradientTo: "#ff3e03",
color: (opacity = 1) => `rgba(${0}, ${0}, ${0}, ${opacity})`
}
]
];

export default class App extends React.Component {
renderTabBar() {
return <StatusBar hidden/>
return <StatusBar hidden />;
}

render() {
const width = Dimensions.get('window').width
const height = 220
const { width } = Dimensions.get("window");
const height = 256;
return (
<ScrollableTabView renderTabBar={this.renderTabBar}>
{chartConfigs.map(chartConfig => {
const labelStyle = {
color: chartConfig.color(),
marginVertical: 10,
textAlign: 'center',
textAlign: "center",
fontSize: 16
}
};
const graphStyle = {
marginVertical: 8,
...chartConfig.style
}
};
return (
<ScrollView
key={Math.random()}
Expand All @@ -110,29 +123,51 @@ export default class App extends React.Component {
>
<Text style={labelStyle}>Bezier Line Chart</Text>
<LineChart
bezier
data={data}
width={width}
height={height}
yAxisLabel="$"
yAxisSuffix="k"
chartConfig={chartConfig}
bezier
style={graphStyle}
verticalLabelRotation={20}
onDataPointClick={({ value, getColor }) =>
showMessage({
message: `${value}`,
description: "You selected this value",
backgroundColor: getColor(0.9)
})
}
formatXLabel={label => label.toUpperCase()}
/>
<FlashMessage duration={1000} />
<Text style={labelStyle}>Progress Chart</Text>
<ProgressChart
data={progressChartData}
width={width}
height={height}
chartConfig={chartConfig}
style={graphStyle}
hideLegend={false}
/>
<Text style={labelStyle}>Bar Graph</Text>
<BarChart
width={width}
height={height}
data={data}
yAxisLabel="$"
chartConfig={chartConfig}
style={graphStyle}
/>
<Text style={labelStyle}>Stacked Bar Graph</Text>
<StackedBarChart
style={graphStyle}
data={stackedBarGraphData}
width={width}
height={220}
chartConfig={chartConfig}
/>
<Text style={labelStyle}>Pie Chart</Text>
<PieChart
data={pieChartData}
Expand All @@ -141,12 +176,15 @@ export default class App extends React.Component {
chartConfig={chartConfig}
accessor="population"
style={graphStyle}
backgroundColor="transparent"
paddingLeft="15"
/>
<Text style={labelStyle}>Line Chart</Text>
<LineChart
data={data}
width={width}
height={height}
yAxisLabel="$"
chartConfig={chartConfig}
style={graphStyle}
/>
Expand All @@ -155,15 +193,105 @@ export default class App extends React.Component {
values={contributionData}
width={width}
height={height}
endDate={new Date('2016-05-01')}
endDate={new Date("2016-05-01")}
numDays={105}
chartConfig={chartConfig}
style={graphStyle}
/>
<Text style={labelStyle}>Line Chart</Text>
<LineChart
data={data}
width={width}
height={height}
yAxisLabel="$"
segments={5}
chartConfig={chartConfig}
style={graphStyle}
hidePointsAtIndex={[0, data.datasets[0].data.length - 1]}
/>
<Text style={labelStyle}>Line Chart with shadow background as line color</Text>
<LineChart
bezier
data={data}
width={width}
height={height}
yAxisLabel="$"
segments={5}
chartConfig={{
...chartConfig,
useShadowColorFromDataset: true
}}
style={graphStyle}
hidePointsAtIndex={[0, data.datasets[0].data.length - 1]}
/>

<Text style={labelStyle}>Scrollable Line Chart</Text>
<LineChart
data={{
labels: [
"January",
"February",
"March",
"April",
"May",
"June"
],
datasets: [
{
data: [
Math.random() * 100,
Math.random() * 100,
Math.random() * 100,
Math.random() * 100,
Math.random() * 100,
Math.random() * 100,
Math.random() * 100
]
}
]
}}
width={Dimensions.get("window").width} // from react-native
height={220}
withInnerLines={false}
withDots={false}
withShadow={false}
withScrollableDot={true}
yAxisInterval={1} // optional, defaults to 1
chartConfig={{
backgroundGradientFrom: "#1F1F1F",
decimalPlaces: 2, // optional, defaults to 2dp
color: (opacity = 1) => "#FF5500",
labelColor: (opacity = 1) => "#A0A0A0",
linejoinType: "round",

scrollableDotFill: "#fff",
scrollableDotRadius: 6,
scrollableDotStrokeColor: "#FF5500",
scrollableDotStrokeWidth: 3,

scrollableInfoViewStyle: {
justifyContent: "center",
alignContent: "center",
backgroundColor: "#121212",
borderRadius: 2
},
scrollableInfoTextStyle: {
color: "#C4C4C4",
marginHorizontal: 4,
flex: 1,
textAlign: "center"
},
scrollableInfoSize: { width: 65, height: 30 },
scrollableInfoOffset: 15
}}
style={{
marginVertical: 8
}}
/>
</ScrollView>
)
);
})}
</ScrollableTabView>
)
);
}
}
Loading