项目加工进度图表实现(echarts)

let color = [
  {
    type: 'linear',
    colorStops: [
      {
        offset: 0,
        color: '#316BCF' // 0% 处的颜色
      },
      {
        offset: 1,
        color: '#20E1FD' // 100% 处的颜色
      }
    ]
  },
  {
    type: 'linear',
    colorStops: [
      {
        offset: 0,
        color: '#1DAD9C' // 0% 处的颜色
      },
      {
        offset: 1,
        color: '#66F5F5' // 100% 处的颜色
      }
    ]
  },
  {
    type: 'linear',
    colorStops: [
      {
        offset: 0,
        color: '#3C5CBF' // 0% 处的颜色
      },
      {
        offset: 1,
        color: '#5098F4' // 100% 处的颜色
      }
    ]
  },
  {
    type: 'linear',
    colorStops: [
      {
        offset: 0,
        color: '#0D2872' // 0% 处的颜色
      },
      {
        offset: 1,
        color: '#0350AF' // 100% 处的颜色
      }
    ]
  }
];

let label = {
  show: true,
  position: 'insideRight',
  textStyle: {
    color: '#fff'
  }
};
option = {
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      // Use axis to trigger tooltip
      type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
    }
  },
  title: {
    text: '项目加工进度'
  },
  color,
  legend: {
    right: '2%',
    bottom: '5%',
    orient: 'vertical',
    selectedMode: false
  },
  grid: {
    left: '3%',
    right: '15%',
    bottom: '3%',
    containLabel: true
  },
  xAxis: {
    type: 'value'
  },
  yAxis: {
    type: 'category',
    data: [
      '项目一',
      '项目二',
      '项目三',
      '项目四',
      '项目五',
      '项目六',
      '项目七'
    ],
    axisTick: false
  },
  series: [
    {
      name: '出货',
      type: 'bar',
      stack: 'total',
      emphasis: {
        focus: 'series'
      },
      data: [120, 162, 161, 194, 150, 230, 210],
      label
    },
    {
      name: '涂装',
      type: 'bar',
      stack: 'total',
      label,
      emphasis: {
        focus: 'series'
      },
      data: [220, 182, 191, 234, 290, 330, 310]
    },
    {
      name: '铆焊',
      type: 'bar',
      stack: 'total',
      emphasis: {
        focus: 'series'
      },
      label,
      data: [150, 212, 201, 154, 190, 330, 410]
    },
    {
      name: '下料',
      type: 'bar',
      stack: 'total',
      label,
      emphasis: {
        focus: 'series'
      },
      data: [345, 647, 467, 456, 675, 856, 579]
    }
  ]
};

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值