用户统计 (users) -柱状图
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/c877a25ad4bde38d7377595a32675d16.png#pic_center)
完整js代码:
(function() {
var item = {
name: "",
value: 1200,
itemStyle: {
color: "#254065"
},
emphasis: {
itemStyle: {
color: "#254065"
}
},
tooltip: {
extraCssText: "opacity: 0"
}
};
var myChart = echarts.init(document.querySelector(".bar"));
var option = {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0, color: "#00fffb" },
{
offset: 1, color: "#0061ce" }
]
),
tooltip: {
trigger: "item"
},
grid: {
left: "0%",
right: "3%",
bottom: "3%",
top: "3%",
containLabel: true,
show: true,
borderColor: "rgba(0, 240, 255, 0.3)"
},
xAxis: [
{
type: "category",
data: [
"上海",
"广州",
"北京",
"深圳",
"合肥",
"",
"......",
"",
"杭州",
"厦门",
"济南",
"成都"