echarts 柱状图

在这里插入图片描述

option = {
  color: ['#39FDF9', '#FBCE39'],
   legend: {//图例文字颜色
     textStyle: {
       color: "#60A8FF"
     },
     //模板
     // formatter: '123{name}'
   },
   tooltip: {
     //提示框
     trigger: 'axis',
     axisPointer: {
       type: 'shadow',
     },
     //提示框模板
     formatter: '<strong> {b0}</strong> <br /> <span style="display: inline-block; margin-right: 4px; border-radius: 10px; width: 10px; height: 10px;background-color: #39FDF9;"></span> 计划完成:<strong>{c0}</strong>万元 <br /> <span style="display: inline-block; margin-right: 4px; border-radius: 10px; width: 10px; height: 10px;background-color: #FBCE39;"></span> 实际完成:<strong>{c1}</strong>万元'
   },
   grid: {
     // 直角坐标系内绘图网格
     show: false,
     backgroundColor: "rgba(9, 146, 71, 0)",// 背景网格颜色
     left: "8%",//绘制直角坐标系位置
     top: "15%",
     right: "4%",
     bottom: "10%",
   },
   xAxis: {
     type: 'category',
     data: ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],
     axisLine: {
       lineStyle: {
         color: "#60A8FF"
       }
     }
   },
   yAxis: {
     name: '单位:万元',
     type: 'value',
     splitLine: {
       show: true,
       lineStyle: {
         color: "#004DA1",//y轴参考线颜色
         type: "dashed"//y轴虚线。可选'solid' 'dashed' 'dotted'
       }
     },
     axisLine: {
       show: true,
       lineStyle: {
         type: "solid", //纵坐标轴 轴线
         color: "#004DA1",//y轴轴线颜色
       }
     }
   },
   series: [
     {
       name: "计划完成:76587万元",
       type: "bar",
       data: [120, 200, 150, 150, 80, 70, 150, 110, 150, 150, 300],
     },
     {
       name: "实际完成:76587万元",
       type: "bar",
       data: [120, 150, 200, 150, 150, 80, 150, 70, 110, 130, 150],
     }
   ]
};
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值