
echarts.jpg
option = {
xAxis: {
type: "category",
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
},
yAxis: {},
series: [{
data: [820, 932, 901, 934, 1290, 1330.2356, 1320],
type: "line",
markPoint: {
data: [
{
type: "max",
},
{
type: 'min'
}
],
// 根据当前某项数据确定标注容器宽高。若为0,固定为30;若非0,其数值位数少于等于4位,固定为 60 ,否则 位数*14 作为其宽高
symbolSize: (e, e1) => e ? e.toString().length <= 4 ? 60 : e.toString().length * 14 : 30,
}
}]
}