React line graph.
npm install @chartiful/react-line-graph
``bash`
npm i @chartiful/react-chart-builder @chartiful/react-line-graph
`jsx
import LineGraph from '@chartiful/react-line-graph'
width={500}
height={300}
lineColor='#347975'
dotColor='#347975'
lineWidth={3}
isBezier
hasDots={true}
baseConfig={{
startAtZero: false,
hasXAxisBackgroundLines: false,
xAxisLabelStyle: {
prefix: '$',
offset: 0
}
}}
style={{
marginBottom: 30,
padding: 10,
paddingTop: 20,
borderRadius: 20,
width: 500,
backgroundColor: #dbf0ef`
}}
/>
- height: number
- width: number
- data:
- labels?: (defaults to [1, 2, 3, ...])
- hasLine?: boolean (defaults to true)
- lineColor?: string (defaults to '#000000')
- lineWidth?: number (defaults to 3)
- hasDots?: boolean (defaults to true)
- dotColor?: string (defaults to '#000000')
- dotSize?: number (defaults to 5)
- isBezier?: boolean (defaults to false)
- hasShadow?: boolean (defaults to false)
- style?: ReactNative.StyleSheet
- baseConfig?: BaseChartConfig` (found here: link)