當echarts中數據過多,為其添加橫向滾動條,在其配置中添加如下代碼
dataZoom: [
{
show: true,
realtime: true,
start: 0,
end: 50
},
{
type: 'inside',
realtime: true,
start: 0,
end: 50
}
]
在柱狀圖中上方添加數據顯示,要在itemStyle中下列配置
itemStyle: {
normal: {
label: {
show: true, //是否顯示
position: 'top',//顯示在頂部
textStyle: {
color: 'black', //字體顏色
fontSize: 14 //字體大小
}
}
},
}