echart从0到1Apache ECharts
一个基于 JavaScript 的开源可视化图表库, 这里记录echart入门基础概念和api使用
安装
npm i -D echarts
// or...图表容器 element
图例 legend
提示工具 tooltip
数据集合 data
图例 chart
坐标系/坐标轴 axis
事件/行为 event/action
数据集合、转换
除了通过独立配置每一图表数据...// x 轴字段顺序
dimensions: ['product', '2015', '2016', '2017'],
source: [
// 数据集通过字段映射到图表上...: string // 数据项 name
dataType: string // 数据项 type,如关系图中的 'node', 'edge'
element: string // 自定义系列中的...fontFaily: 'siyuan',
fontSize: 14,
borderRadius: [4, 4, 0, 0],
align: 'center', // 定位