<template>
<!--  rgb(36, 151, 241)      #2368c5     #323345   #d2d2d2-->
  <div class="dashboard-editor-container">
   <panel-group/>
   <el-row>
     <el-col :xs="24" :sm="24" :lg="16">
       <LineChart :chart-data="lineChartData" style="padding:0;background-color: #fff;" />
     </el-col>
      <el-col :xs="24" :sm="24" :lg="8">
        <div class="chart-wrapper">
          <BarChart/>
        </div>
      </el-col>
      <el-col :xs="24" :sm="24" :lg="16">
        <div class="chart-wrapper">
          <RaddarChart />
        </div>
      </el-col>
      <el-col :xs="24" :sm="24" :lg="8">
          <div class="chart-wrapper">
            <PieChart />
          </div>
        </el-col>
    </el-row>
  </div>
</template>
<script>
import BarChart from './dashboard/BarChart'
import PieChart from './dashboard/PieChart'
import RaddarChart from './dashboard/RaddarChart'
import PanelGroup from './dashboard/PanelGroup'
import LineChart from './dashboard/LineChart'
const lineChartData = {
  newVisitis: {
    expectedData: [100, 120, 161, 134, 105, 160, 165],
    actualData: [120, 82, 91, 154, 162, 140, 145]
  },
  messages: {
    expectedData: [200, 192, 120, 144, 160, 130, 140],
    actualData: [180, 160, 151, 106, 145, 150, 130]
  },
  purchases: {
    expectedData: [80, 100, 121, 104, 105, 90, 100],
    actualData: [120, 90, 100, 138, 142, 130, 130]
  },
  shoppings: {
    expectedData: [130, 140, 141, 142, 145, 150, 160],
    actualData: [120, 82, 91, 154, 162, 140, 130]
  }
}
export default {
  name: 'Index',
  components: {
    PanelGroup,
    LineChart,
    RaddarChart,
    PieChart,
    BarChart
  },
  data() {
    return {
      lineChartData: lineChartData.newVisitis
    }
  },
  methods: {
    handleSetLineChartData(type) {
      this.lineChartData = lineChartData[type]
    }
  }
}
</script>

<style lang="scss" scoped>
  .el-table__header{
    width: 100% !important;
  }
  .el-table__body{
    width: 100% !important;
  }
  body .el-table th.gutter{
    display: table-cell!important;
  }

.dashboard-editor-container {
  padding: 12px;
  background-color: rgb(240, 242, 245);
  position: relative;

  .chart-wrapper {
    /*background: #fff;*/
    /*padding: 16px 16px 0;*/
    margin-bottom: 12px;
  }
}

@media (max-width:1024px) {
  .chart-wrapper {
    padding: 8px;
  }
}
</style>
