react-native-animated-charts icon indicating copy to clipboard operation
react-native-animated-charts copied to clipboard

chart dot doesn't move how drag it on the chart ?

Open saadelsabahy opened this issue 4 years ago • 3 comments

import react from 'react'; import {dimensions, view} from 'react-native'; import {chartdot, chartpath, chartpathprovider, monotonecubicinterpolation} from '@rainbow-me/animated-charts';

export const {width: size} = dimensions.get('window');

export const data = [ {x: 1453075200, y: 1.47}, {x: 1453161600, y: 1.37}, {x: 1453248000, y: 1.53}, {x: 1453334400, y: 1.54}, {x: 1453420800, y: 1.52}, {x: 1453507200, y: 2.03}, {x: 1453593600, y: 2.10}, {x: 1453680000, y: 2.50}, {x: 1453766400, y: 2.30}, {x: 1453852800, y: 2.42}, {x: 1453939200, y: 2.55}, {x: 1454025600, y: 2.41}, {x: 1454112000, y: 2.43}, {x: 1454198400, y: 2.20}, ];

const points = monotonecubicinterpolation(data)(40);

const Chart = () => ( <view style={{ backgroundcolor: 'black' }}> <chartpathprovider data={{ points, smoothingstrategy: 'bezier' }}> <chartpath height={size / 2} stroke="yellow" width={size} /> <chartdot style={{ backgroundcolor: 'blue' }} /> ) export default Chart

saadelsabahy avatar Nov 02 '20 00:11 saadelsabahy

Hey, @saadelsabahy Can you make a workable example, please?

osdnk avatar Nov 09 '20 23:11 osdnk

I'm solving this today

pistonsky avatar Nov 26 '21 08:11 pistonsky

i am unable to see the dot in my code can someone help

git Code :- https://github.com/RushikeshBhandare/RainbowChart

image

RushikeshBhandare avatar Dec 01 '21 12:12 RushikeshBhandare