停车场运营分析

描述:当前是关于Echarts图表中的 示例。
 
            option = {
   backgroundColor: '#2c343c',
   grid: {
      top: 84,
      right: 20,
      bottom: 20,
      left: 22,
      containLabel: true
   },
   legend: {
      data: [
         {
            name: '停车数',
            textStyle: {
               color: '#ffffff'
            },
            itemStyle: {
               color: '#2AECFF'
            }
         },
         {
            name: '平均停车时间',
            textStyle: {
               color: '#ffffff'
            },
            itemStyle: {
               color: '#FFE600'
            }
         }
      ],
      icon: 'rect',
      itemWidth: 8,
      itemHeight: 8,
      itemGap: 40,
      top: 20
   },
   xAxis: {
      data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31],
      // data: [1, 2, 3, 4, 5],
      axisLabel: {
         color: '#ffffff',
         interval: index => [0, 9, 19, 29].includes(index)
      },
      axisTick: {
         show: false
      },
      axisLine: {
         lineStyle: {
            color: 'rgba(42, 236, 255, 0.44)',
            width: 1.5
         }
      }
   },
   yAxis: [
      {
         type: 'value',
         splitNumber: 4,
         axisLabel: {
            color: '#ffffff'
         },
         axisTick: {
            show: false
         },
         axisLine: {
            show: true,
            lineStyle: {
               color: 'rgba(42, 236, 255, 0.44)',
               width: 1.5
            }
         },
         splitLine: {
            lineStyle: {
               color: 'rgba(17,110,129,0.36)',
               type: 'dashed'
            }
         },
         name: '单位:辆',
         nameGap: 18,
         nameTextStyle: {
            fontSize: 10,
            color: '#ffffff',
            padding: [0, 0, 0, -30]
         }
      },
      {
         type: 'value',
         splitNumber: 2,
         splitLine: {
            show: false
         },
         axisLabel: {
            color: '#ffffff'
         },
         name: '单位:小时',
         nameGap: 18,
         nameTextStyle: {
            fontSize: 10,
            color: '#ffffff'
         }
      }
   ],
   series: [
      {
         name: '停车数',
         yAxisIndex: 0,
         type: 'bar',
         data: [100, 90, 120, 135, 70, 127, 150, 180, 230, 250, 127, 150, 180, 80, 120, 135, 70, 70, 230, 250, 160, 146, 173, 249, 180, 80, 70, 230, 127, 150, 180],
         itemStyle: {
            normal: {
               color: {
                  type: 'linear',
                  x: 0,
                  y: -0.2,
                  x2: 0,
                  y2: 1,
                  colorStops: [
                     {
                        offset: 0,
                        color: 'rgba(42, 236, 255, 1)'
                     },
                     {
                        offset: 1,
                        color: 'rgba(42, 234, 254, 0.13)'
                     }
                  ]
               }
            }
         }
      },
      {
         name: '平均停车时间',
         yAxisIndex: 1,
         type: 'line',
         data: [1, 1.2, 2.2, 1.6, 1.6, 2.8, 1, 2, 2.2, 1.6, 1.3, 1.5, 1, 2, 2.2, 1.6, 1, 2, 2.2, 1.6, 2.8, 1.8, 1.2, 1.4, 2.2, 1.6, 2.8, 1.4, 1.9, 1.4, 1.5],
         symbol: 'none',
         lineStyle: {
            color: '#ffd918'
         },
         areaStyle: {
            color: {
               type: 'linear',
               x: 0,
               y: -0.2,
               x2: 0,
               y2: 1,
               colorStops: [
                  {
                     offset: 0,
                     color: 'rgba(255, 230, 0, 0.54)'
                  },
                  {
                     offset: 1,
                     color: 'rgba(255, 230, 0, 0)'
                  }
               ]
            }
         }
      }
   ]
}