Echarts实践笔记(二)

345 阅读1分钟

基础折线图

多折线

series接受多个type="line "元素的数组。

  • series 系列(视图中的每个图表描述)
    • encode: 映射dataset.source中的key,作为横纵坐标
  • dataset.source 接受多个记录的数组,记录形式例如:
{
	xKey0: number,
	yKey0: number,
	yKey1: number,
	yKey2: number
}

效果1-1

折线绘制动画

  • animation 是否开启动画
  • animationDuration 动画持续时长
  • animationEasing 动画速度效果
  • animationDelay 动画延后时间 update动画属性只对切换工具栏更改视图有效,animationEasing在初次渲染生效,异步载入数据注意提前调用clear方法! 效果1-2