echarts12

1.1.6 • Public • Published

这是一个不需要额外配置,安装即可以使用的 Taro Echarts 组件。echarts12 名字本来是测试一下使用的,结果忘记 unpublish 了。目前可以正常使用。

图表组件

该项目只是一个 Taro Component,ec-canvas 参考 echarts-for-weixin https://github.com/ecomfe/echarts-for-weixin

安装依赖

    yarn add echarts12

使用方法

    // 方式一
    import Echart from 'echarts12'
    // 方式二
    import { Echart } from 'echarts12'

    <Echart option={ option } />

参数解释

属性名 说明 必选
option 同 echarts 的 option 配置
ec 控制是否延迟加载以及事件禁止,默认 { lazyLoad: false, disableTouch: true }
onInit 初始化回调函数,参数为 chart ,可以通过 chart 做事件绑定等操作
style 自定义样式,例如可以修改默认 200 的 height

其它

wepy 中如何使用?


原生小程序 中如何使用?


压缩 echarts.js(可选)

taro/config/index.js

    copy: {
        patterns: [
            {
                from: 'ecahrts.js',
                to: `dist/npm/echarts12/dist/${process.env.TARO_ENV}/components/echart/echarts.js`,
            }
        ],
        options: {}
    }

支持情况

微信小程序 h5

Package Sidebar

Install

npm i echarts12

Weekly Downloads

18

Version

1.1.6

License

MIT

Unpacked Size

2.79 MB

Total Files

25

Last publish

Collaborators

  • cangku