0.1.2 • Published 5 years ago
@chartiful/react-native-line-graph v0.1.2
Line Graph
Installation
npm i @chartiful/react-native-chart-builder @chartiful/react-native-line-graphExample
import LineGraph from '@chartiful/react-native-line-graph'
<LineGraph
data={[10, 15, 7, 20, 14, 12, 10, 20]}
width={375}
height={300}
isBezier
hasShadow
baseConfig={{
startAtZero: false,
hasXAxisBackgroundLines: false
}}
style={{
marginTop: 30
}}
/>Interface
height: numberwidth: numberdata:<Array>numberlabels?:<Array>string(defaults to[1, 2, 3, ...])hasLine?: boolean (defaults totrue)lineColor?: string (defaults to'#000000')lineWidth?: number (defaults to3)hasDots?: boolean (defaulst totrue)dotColor?: string (defaults to'#000000')dotSize?: number (defaulse to5)isBezier?: boolean (defaults tofalse)hasShadow?: boolean (defaults tofalse)style?:ReactNative.StyleSheetbaseConfig?:BaseChartConfig(found here: link)