react native charts
yarn add react-native-chart-kit
import {
LineChart,
BarChart,
PieChart,
ProgressChart,
ContributionGraph,
StackedBarChart
} from "react-native-chart-kit";
import { Dimensions, View, Text } from 'react-native';
<View>
<Text>Bezier 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
]
}
]
}}
width={Dimensions.get("window").width}
height={220}
yAxisLabel="$"
yAxisSuffix="k"
yAxisInterval={1} // optional, defaults to 1
chartConfig={{
backgroundColor: "#e26a00",
backgroundGradientFrom: "#fb8c00",
backgroundGradientTo: "#ffa726",
decimalPlaces: 2, // optional, defaults to 2dp
color: (opacity = 1) => `rgba(255, 255, 255, ${opacity})`,
labelColor: (opacity = 1) => `rgba(255, 255, 255, ${opacity})`,
style: {
borderRadius: 16
},
propsForDots: {
r: "6",
strokeWidth: "2",
stroke: "#ffa726"
}
}}
bezier
style={{
marginVertical: 8,
borderRadius: 16
}}
/>
</View>
Also in JavaScript:
- devexpress dxdatagrid custom text field link
- javascript callback function
- javascript destructing
- javascript redirect button
- function para mter js
- "withAuth.js" in react
- toast message in reactstarp
- javascript prevent context menu
- javascript call() & apply() vs bind()?
- javascript use regex to check for phone number
- what is public key
- javascript get url parameters
- Error [ERR_METHOD_NOT_IMPLEMENTED]: The _write() method is not implemented
- angular directive
- find in highest value key from an object javascript
- javascript append to json
- JS how to determine if page was cached
- react-data-table-component api action button
- google apps script lock service
- how to change a css variable with javascript
- android intent data as jsonobject
- javascript merge multidimensional array
- curl pretty print json
- jquery enable textbox