Newer
Older
CloudBrainNew / src / views / wisdomEducation / components / option.js
StephanieGitHub on 4 Feb 2021 1 KB first commit
import { countSize } from "@/utils/utils"
export function schoolInfo() {
  return {
    legend: {
      align: "left",
      right: 5,
      itemWidth: 8,
      itemHeight: 8,
      icon: 'rect',
      textStyle: {
        color: "#fff",
        fontSize: 9,
      }
    },
    tooltip : {
      trigger: 'axis',
      axisPointer : {            // 坐标轴指示器,坐标轴触发有效
        type : 'shadow'        // 默认为直线,可选为:'line' | 'shadow'
      }
    },
    color: ['#249df8', "#fdb628", "#68dfe3", "#eb6f49" ],
    grid: {
      left: "0",
      right: "0",
      bottom: "4%",
      top: '10%',
      containLabel: true
    },
    dataset: {
      source: [
        ['学校信息', '老师数', '班级数', '学生数'],
        // ['刑事案件', 43.3, 85.8, 93.7, 93.7],
        // ['民事纠纷事件', 83.1, 73.4, 55.1, 83.1,],
        // ['聚众群体事件', 86.4, 65.2, 82.5, 83.1,],
        // ['黄赌毒事件', 72.4, 53.9, 39.1, 83.1,],
        // ['消防事件', 43.3, 85.8, 93.7, 93.7, 83.1,],
        // ['突发应急事件', 83.1, 73.4, 55.1, 83.1,],
        // ['治安事件', 86.4, 65.2, 82.5, 83.1,],
      ]
    },
    xAxis: {
      type: 'category',
      axisLine: {
        lineStyle: {
          color: "#0b146f" //轴线的颜色
        }
      },
      axisLabel: {
        textStyle: {
          color: '#fff',
          fontSize: 9,
        }
      },
    },
    yAxis: {
      name: "人",
      nameTextStyle: {
        color: '#fff',
        fontSize: 11,
        verticalAlign:'middle',
      },
      axisLine: {
        lineStyle: {
          color: "#0b146f" //轴线的颜色
        }
      },
      splitLine: {
        lineStyle: {
          color: ["#101641"],
          type: "solid"
        }
      },
      axisLabel: {
        textStyle: {
          color: '#fff',
          fontSize: 8,
        }
      },
    },
    series: [
      {type: 'bar'},
      {type: 'bar'},
      {type: 'bar'}
    ]
  }
}