yAxisIndex
使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用。
https://echarts.apache.org/zh/option.html#series-line.yAxisIndex
双Y轴在线案例
https://echarts.apache.org/examples/zh/editor.html?c=mix-line-bar
https://echarts.apache.org/examples/zh/editor.html?c=multiple-y-axis
多Y轴刻度对齐
yAxis
alignTicks: true
{yAxis: [{type: "value",alignTicks: true, // 配置多坐标轴标签对齐axisLabel: {show: true,color: "#999",fontSize: 12,lineHeight: 14,},splitLine: { show: false },},],}
legend图例
数组
legend: {itemWidth: 12,itemHeight: 10,itemGap: 16, // 设置间距data: [{name: '进度', icon: 'rect'},{name: '总量', icon: 'rect'},]}
icon形状
没有 line 线状图例,可以设置 itemHeight: 2来实现
icon 类型包括 circle,rect,line,roundRect,triangle,diamond,pin,arrow,none
| icon | 展示 |
|---|---|
| circle | 圆形 |
| rect | 矩形 |
| roundRect | 圆角矩形 |
| triangle | 三角形 |
| diamond | 菱形 |
| pin | 水滴 |
| arrow | 箭头 |
| none | 不显示图标 |
