Newer
Older
smartKitchenFront / src / views / dashboard / components / layoutChartRadar.vue
<template>
  <div class="chart-container">
    <div class="chart-header">
      <!--标题  -->
      <span class="title">用户分布统计</span>
    </div>
    <div class="chart-content" :style="{'height':height,'width':width}">
      <!-- echarts内容 -->
      <baseRadarChartVue :seriesData="seriesData" :indicator="indicator" />
    </div>
  </div>
</template>

<script>
import baseRadarChartVue from "../../../components/echart/radarChart/baseRadarChart.vue";
export default {
  name: "layoutChartSelect",
  components: {
    baseRadarChartVue,
  },
  props: {
    name: {
      type: String,
      default: "",
    },
    width:{
      type: String,
      default: "500px"
    },
    height:{
      type: String,
      default: "250px"
    }
  },
  data() {
    return {
      value: "12",
      options: [
        {
          value: "12",
          label: "近一年",
        },
        {
          value: "1",
          label: "近一月",
        },
      ],
      seriesData: [],
      indicator: [],
    };
  },
  mounted() {
    setTimeout(() => {
      this.seriesData = [
        {
          type: "radar",
          data: [
            {
              value: [4200, 3000, 20000, 35000, 50000, 18000],
              name: "Allocated Budget",
            },
          ],
        },
      ];
      this.indicator = [
        { name: "Sales", max: 6500 },
        { name: "Administration", max: 16000 },
        { name: "Information Technology", max: 30000 },
        { name: "Customer Support", max: 38000 },
        { name: "Development", max: 52000 },
        { name: "Marketing", max: 25000 },
      ];
    });
  },
};
</script>

<style lang="scss" scoped>
.chart-container {
  .chart-header {
    width: 600px;
    align-items: center;
    display: flex;
    justify-content: space-between;
  }
  .chart-content {
    // width: 600px;
    // height: 400px;
  }
}
</style>