echarts实现多折线

在这里插入图片描述

option = {
  title: {
    text: 'Stacked Line'
  },
  tooltip: {
    trigger: 'axis'
  },
  legend: {
    data: ['广州西门子变压器公司', '耐恒(广州)纸品有限公司', '广州斗原钢铁有限公司', '广州璨宇光学有限公司', '佐登妮丝(广州)有限公司']
  },
  grid: {
    left: '3%',
    right: '4%',
    bottom: '3%',
    containLabel: true
  },
  toolbox: {
    feature: {
      saveAsImage: {}
    }
  },
  xAxis: {
    type: 'category',
    boundaryGap: false,
    data: ['2021-12-20 00:00:00', '2021-12-20 06:00:00', '2021-12-20 12:00:00', '2021-12-20 18:00:00', '2021-12-21 00:00:00', '2021-12-21 06:00:00', '2021-12-21 12:00:00', '2021-12-21 18:00:00', '2021-12-22 00:00:00']
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      name: '广州西门子变压器公司',
      type: 'line',
      // stack: 'Total',
      data: [130, 105, 135, 120, 175, 205, 185, 195, 208],
      smooth: true,
    },
    {
      name: '耐恒(广州)纸品有限公司',
      type: 'line',
      // stack: 'Total',
      data: [225, 222, 180, 234, 205, 180, 170, 220, 231],
      smooth: true,
    },
    {
      name: '广州斗原钢铁有限公司',
      type: 'line',
      // stack: 'Total',
      data: [180, 230, 201, 150, 230, 230, 240, 210, 240],
      smooth: true,
    },
    {
      name: '广州璨宇光学有限公司',
      type: 'line',
      // stack: 'Total',
      data: [180, 175, 201, 210, 200, 142, 205, 235, 248],
      smooth: true,
    },
    {
      name: '佐登妮丝(广州)有限公司',
      type: 'line',
      // stack: 'Total',
      data: [235, 250, 238, 252, 260, 245, 235, 235, 230],
      smooth: true,
    }
  ]
};
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值