echarts 使用配置

pie.setOption({
  title: {
    text: '',
    x: 'center',
    textStyle: {
      fontWeight: 'normal',
      fontSize: 12,
      color: '#000',
    },
    borderWidth: 1,
    padding: [ 8, 16 ],
    borderColor: '#000',
  },
  tooltip: {
    trigger: 'item',
    formatter: '{a} <br/>{b} : {c} ({d}%)',
    textStyle: {
      fontSize: 12,
    },
  },
  series: [
    {
      type: 'pie',
      name: '',
      radius: '70%',
      center: [ '50%', '60%' ],
      data: [],
      label: {
        normal: {
          show: false,
        },
      },
      labelLine: {
        normal: {
          show: false,
        },
      },
    },
  ],
  color: [ '#95B3D7', '#DCE6F2' ],
});
line.setOption({
  tooltip: {
    trigger: 'axis',
  },
  legend: {
    orient: 'vertical',
    right: 70,
    top: 80,
    data: [],
    textStyle: {
      fontSize: 14,
      color: '#000',
    },
    itemWidth: 30,
    itemHeight: 10,
  },
  grid: {
    right: 300,
    left: 50,
  },
  xAxis: {
    type: 'category',
    axisLine: {
      lineStyle: {
        color: 'grey',
      },
    },
    axisLabel: {
      interval: 0,
      rotate: 30,
      color: '#000',
    },
    data: [],
  },
  yAxis: {
    type: 'value',
    axisLine: {
      lineStyle: {
        color: 'grey',
      },
    },
    axisLabel: {
      color: '#000',
    },
  },
  series: [
    {
      type: 'line',
      name: '',
      symbol: 'diamond',
      symbolSize: 8,
      data: [],
    },
    {
      type: 'line',
      name: '',
      symbol: 'rect',
      symbolSize: 4,
      data: [],
    },
    {
      type: 'line',
      name: '',
      symbol: 'triangle',
      symbolSize: 8,
      data: [],
    },
    {
      type: 'line',
      name: '',
      symbol: 'circle',
      symbolSize: 4,
      data: [],
    },
  ],
  color: [ '#5183BE', '#C0504D', '#9BBB59', '#A793BE' ],
});
bar.setOption({
  title: {
    text: '成交订单数量',
    x:'center',
  },
  tooltip: {
    trigger: 'axis',
    axisPointer: { // 坐标轴指示器,坐标轴触发有效
      type : 'shadow', // 默认为直线,可选为:'line' | 'shadow'
    },
  },
  grid: {
    left: '3%',
    right: '4%',
    bottom: '3%',
    containLabel: true,
  },
  xAxis: [
    {
      type: 'category',
      axisLabel: {
        interval: 0, // 强制显示所有标签
        rotate: 30,
      },
      axisTick: {
        length: 2,
      },
      data: [],
    }
  ],
  yAxis: [
    {
      type : 'value',
    }
  ],
  series: [
    {
      name:'成交订单数量',
      type:'bar',
      barWidth: '50', //
      data: [],
    },
  ],
});
gauge.setOption({
  series: [
    {
      type: 'gauge',
      name: 'speed',
      radius: '100%',
      min: 0,
      max: 220,
      splitNumber: 11,
      axisLine: { // 坐标轴线
        lineStyle: { // 属性lineStyle控制线条样式
          color: [
            [ 0.2, '#a4ed96' ], [ 0.6, '#95ccea' ], [ 0.8, '#f4ae34' ], [ 1, '#ee5314' ],
          ],
          width: 10,
        },
      },
      splitLine: { // 分隔线
        length: 14, // 属性length控制线长
        lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
          color: 'auto',
        },
      },
      axisTick: { // 坐标轴小标记
        splitNumber: 5,
        length: 8, // 属性length控制线长
        lineStyle: { // 属性lineStyle控制线条样式
          color: 'auto',
        },
      },
      pointer: {
        length: '60%',
        width: 6,
      },
      title: {
        offsetCenter: [ '0', '60%' ],
        color: 'auto',
        fontWeight: 'bolder',
        fontSize: 14,
        backgroundColor: 'transparent',
      },
      detail: {
        offsetCenter: [ '0', '80%' ],
        formatter: '{value}km/h',
      },
      data: [
        { value: 0, name: 'speed' },
      ],
    },
  ],
});
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值