Echarts设置legend图标为圆,长方形,扇形等图形

echarts yekong 40℃

legend图标

通过icon设置图标

circle圆形

wanjunshijiecom 2021-09-07 at 17.48.32

rect 方形

wanjunshijiecom 2021-09-07 at 17.48.47@2x

roundRect 圆角方形

wanjunshijiecom 2021-09-07 at 17.49.34@2x

triangle 三角形

wanjunshijiecom 2021-09-07 at 17.50.02@2x

diamond 棱形

wanjunshijiecom 2021-09-07 at 17.50.16@2x

pin 水滴

wanjunshijiecom 2021-09-07 at 17.50.27@2x

arrow箭头

wanjunshijiecom 2021-09-07 at 17.51.06@2x

none 无图标

wanjunshijiecom 2021-09-07 at 17.51.26@2x

legend: {
data: ["已解决", "未解决"],
icon: "circle",   //  这个字段控制形状  类型包括 circle圆形,rect方形 ,roundRect,triangle,diamond,pin,arrow,none
itemWidth: 10,  // 设置宽度
itemHeight: 10, // 设置高度
itemGap: 20 // 设置间距
},
喜欢 (0)