taro-chart-f2
taro-chart-f2
目前支持: 微信小程序
根据 taro-f2@1.2.1
修改而来 https://www.npmjs.com/package/taro-f2/v/1.2.1
F2图表具体使用方法请参考: https://github.com/antvis/f2
安装
$ npm i -S taro-chart-f2
修改项目配置文件 config/index.js
用法
示例
// 绘制实例const draw = chart: null data: { let chartData = name: '超大盘能力' value: 65 name: '抗跌能力' value: 95 name: '稳定能力' value: 9 name: '绝对收益能力' value: 6 name: '选证择时能力' value: 6 name: '风险回报能力' value: 8 // 模拟异步请求 } { let data = drawnumdata let chart = el: canvas width height ; chartsourcedata value: min: 0 max: 10 ; chart; chartaxis'value' grid: lineDash: null label: null line: null ; chartaxis'name' grid: lineDash: null ; chart color'#FE5C5B' style fillOpacity: 02 ; chart color'#FE5C5B' size1 ; chartcolor'#FE5C5B'; charttext position: '50%' '50%' content: '73' style: fontSize: 32 fontWeight: 'bold' fill: '#FE5C5B' ; chart; drawnumchart = chart } { return <View className='index'> <View style='width:100%;height:500px'> <F2Canvas onInit=thisdrawRadar></F2Canvas> </View> </View> }