rainbow-me / react-native-animated-charts

Set of components and helpers for building complex and beautifully animated charts
MIT License
924 stars 111 forks source link

Cant get chart to show at all #68

Closed glenskie16 closed 2 years ago

glenskie16 commented 2 years ago

Is there something wrong with my script? I see other 'YouTube' tutorials on making crypto charts and I copied but no chart showing.

Any help would be appreciated.

`import React from 'react'; import {Dimensions, View} from 'react-native'; import {ChartDot, ChartPath, ChartPathProvider} from '@rainbow-me/animated-charts';

export const {width: SIZE} = Dimensions.get('window');

export const data = [{"x":1644604291,"y":0.0001498},{"x":1644604281,"y":0.00014981},{"x":1644604271,"y":0.00014981},{"x":1644604251,"y":0.0001498},{"x":1644604241,"y":0.00014984},{"x":1644604231,"y":0.00014984},{"x":1644604221,"y":0.00014984},{"x":1644604211,"y":0.00014983},{"x":1644604192,"y":0.00014986},{"x":1644604182,"y":0.00014992},{"x":1644604172,"y":0.00014992},{"x":1644604162,"y":0.0001499},{"x":1644604152,"y":0.00014991}];

const ModalScreen = () => { return ( <View style={{ backgroundColor: 'black' }}> <ChartPathProvider data={{ data, smoothingStrategy: 'bezier' }}> <ChartPath height={SIZE / 2} stroke="green" width={SIZE} /> <ChartDot style={{ backgroundColor: 'red' }} /> ); };

export default ModalScreen; `

azbub commented 2 years ago

how did you solve this ?