当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 //字体大小
}
}
},
}