您好,欢迎来到爱go旅游网。
搜索
您的当前位置:首页Echart--折线图

Echart--折线图

来源:爱go旅游网

效果图:

设置数据:

option1: {
          title: {
            text: '入离职统计'
          },
          tooltip: {//提示框组件,default:'item',还有axis,none
            trigger: 'axis'
          },
          legend: {
            data: ['入职', '离职']//显示条
          },
          grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
          },
          toolbox: {
            feature: {
              saveAsImage: {},保存为png图片
              magicType: {//切换图表显示类型
                type: ['line', 'bar', 'stack', 'tiled']
              }
            }
          },
          xAxis: {
            type: 'category',
            boundaryGap: false,
            data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月']
          },
          yAxis: {
            type: 'value'
          },
          series: [
            {
              itemStyle: {normal: {label: {show: true}}},
              name: '入职',
              type: 'line',//设置图表类型
              // stack: '总量',
              data: [12, 13, 10, 13, 9, 23, 21]
            },
            {
              itemStyle: {normal: {label: {show: true}}},
              name: '离职',
              type: 'line',
              // stack: '总量',
              data: [2, 1, 4, 8, 10, 4, 6]
            }
          ]
        }

  

 

转载于:https://www.cnblogs.com/LWJ-booke/p/8492398.html

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- igat.cn 版权所有 赣ICP备2024042791号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务