Created
October 11, 2019 09:27
-
-
Save LintangWisesa/48cedce6210e18050f415d0e36087868 to your computer and use it in GitHub Desktop.
React Native Chart Kit - #2 Bezier Line Chart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<LineChart | |
data={{ | |
labels: ["Januari", "Februari", "Maret", "April", "Mei", "Juni"], | |
datasets: [ | |
{ | |
data: [ | |
Math.random() * 100, | |
Math.random() * 100, | |
Math.random() * 100, | |
Math.random() * 100, | |
Math.random() * 100, | |
Math.random() * 100 | |
] | |
} | |
] | |
}} | |
width={Dimensions.get("window").width - 50} // from react-native | |
height={220} | |
yAxisLabel={"Rp"} | |
chartConfig={{ | |
backgroundColor: "#e26a00", | |
backgroundGradientFrom: "#fb8c00", | |
backgroundGradientTo: "#ffa726", | |
decimalPlaces: 2, // optional, defaults to 2dp | |
color: (opacity = 1) => `white`, | |
labelColor: (opacity = 1) => `white`, | |
style: { | |
borderRadius: 16 | |
} | |
}} | |
bezier | |
style={{ | |
marginVertical: 8, | |
borderRadius: 16 | |
}} | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment