写给女朋友的极坐标demo啊

134 阅读1分钟
option = {
  title: [
    {
      text: 'Radial Polar Bar Label Position (middle)',
    textStyle:{
      color:"green"
    }
    }
  ],
  
  polar: {
    radius: [0.3,'60%']
  },
  textStyle:{
    color:"#FFF",
  },
  color:[
    '#11e8d1',
    'green',
    ],
  radiusAxis: {
    // zlevel:1,
    max: 100,
    type:"value",
    // nameRotate: 45,
    // name:"am6:00000",
    // nameGap:100,
    
    // boundaryGap: ['100%', '100%'],
    nameTextStyle:{
      color:"#409EFF"
    },
    // nameLocation:"start",
    // boundaryGap: false,
    axisLine:{
      show:false,
      // symbol:['none', 'arrow'],
      lineStyle:{
        color:"red",
      },
    },
    axisTick:{
      show: false,
      lineStyle:{
         color:"#FFF",
      }
    },
    axisLabel:{
      // verticalAlign:"bottom",
      // margin:25,
      // show:false,
      align:"right",
      textStyle:{
        color:"#fff",
        
      },
      // rotate:90
    },
    splitLine:{
      show:true,
      lineStyle:{
         color: ['#409EFF'] ,
      }
     
    }
  },
  angleAxis: {
    // zlevel:2,
    // clockwise:false,
    // polarIndex:5,
    axisLabel: {
      show: true,
      interval: 1,
      align: "center"
    },
    type: 'category',
    data: ['0:00','1:00', '2:00', '3:00', '4:00', '5:00', {
      value:'am6:00',
      textStyle: {
        fontSize: 18,
        color: 'yellow'
    }
    }, '7:00', '8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00'],
    axisLine:{
      show:false,
    },
    splitLine: {
     show: true,
     lineStyle:{
      color:"#409EFF",
    },
    },
    axisTick: {
      show: false
    },
    startAngle: 270,
    axisPointer:{
       show: true
    },
    
  },
  tooltip: {
    // trigger:"axis"
  },
  series: {
    type: 'bar',
    data: [18, 95, 86, 28, 50, 46, 34, 64, 50, 59, 31, 18, 95, 56, 1, 57, 9, 17, 90, 91, 68, 56, 57, 88]
,
    coordinateSystem: 'polar',
    label: {
      show: false,
      position: 'middle',
      // formatter: '{b}: {c}'
    }
  },
  backgroundColor: '#0b4786',
  animation: false
};