如果为 false
,而 series.emphasis.label.show
为 true
,则表示只有在鼠标移动到该数据时,才显示数值。
option = {
xAxis: {
data: [“a”, “b”, “c”, “d”, “e”, “f”],
},
yAxis: {},
series: {
data: [1, 2, 3, 4, 5, 6],
type: “line”,
label: {
show: false,
position: “top”,
textStyle: {
fontSize: 20,
},
},
emphasis: {
label: {
show: true,
},
},
},
};
在一个系列中,可能一个横坐标对应的取值是“空”的,将其设为 0 有时并不能满足我们的期望–空数据不应被其左右的数据连接。
在 ECharts 中,我们使用字符串 '-'
表示空数据,这对其他系列的数据也是适用的。
option = {
xAxis: {
data: [“a”, “b”, “c”, “d”, “e”, “f”],
},
yAxis: {},
series: {
data: [1, 2, ‘-’, 4, 5, 6],
type: “line”,
},
};
====================================================================
与堆叠柱状图类似,堆叠折线图也是用系列的 stack
设置哪些系列堆叠在一起。
option = {
xAxis: {
data: [“a”, “b”,