1.0.24 • Published 2 years ago

@dpdfe/wcharts v1.0.24

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

引入

import wcharts from '@dpdfe/wcharts';

使用

const myChart = new wcharts(dom, {options, theme_type, theme_options, opts});
myChart.draw();

参数介绍

dom --- 图表渲染的 dom 节点。

options --- 同 EChartsOption 的参数,参考文档:https://echarts.apache.org/zh/option.html#title。

theme_type --- 主题的类型,可选参数,wcharts 新增内置 'blue'、'green'、'yellow'、'pink_and_purple'、'green_and_blue'几种风格的主题,也支持配置通过 theme_options 传递的自定义主题类型。

theme_options --- 自定义主题风格的配置,可选参数,同 echarts 中 registerTheme 的 theme 参数,参考文档:https://echarts.apache.org/zh/api.html#echarts.registerTheme。

opts --- 附加参数,可选参数,和 echarts 配置相同,参考文档:https://echarts.apache.org/zh/api.html#echarts。