我将工作中自己造的一些轮子,整理成了现在这个仓库
npm i build
yarn add react-native-svg lodash
npm i react-native-chowder
npm Login
npm version patch
npm publish
基于react-native-svg 实现的图表,兼容android和ios
import {GuageSvg} from 'react-native-chowder';
...
<GuageSvg progress={66} />
import {KLineBase} from 'react-native-chowder';
<KLineBase data={[
[
1634092200000,
56403.38,
56429.96,
56397.52,
56429.96,
],
[
1634094000000,
56409.48,
56463.28,
56385.63,
56463.28,
],
[
1634095800000,
56515.48,
56542.51,
56466.01,
56466.01,
]]} />
import {KLineBase} from 'react-native-chowder';
...
//必须在外面套上view,并指定高度
<View style={{ height: 248 }}>
<KLinePanResponder data={data24H} backPng={require('./src/assets/backGround.png')} />
</View>
import {PieCircle} from 'react-native-chowder';
...
//必须在外面套上view,并指定高度
<PieCircle />
import {PiePaht} from 'react-native-chowder';
...
//必须在外面套上view,并指定高度
<PiePaht />