<script setup>
import * as echarts from "echarts";
import { ref, onMounted } from "vue";

let charts = ref(null);

onMounted(() => {
  const myChart = echarts.init(charts.value);

  let options = {
    xAxis: {
      type: "category",
      data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
    },
    yAxis: {
      type: "value",
    },
    series: [
      {
        data: [150, 230, 224, 218, 135, 147, 260],
        type: "line",
      },
    ],
  };

  myChart.setOption(options);
});

const tableData = [
  {
    date: "2023-12-15",
    name: "王小明",
    tel: "0912345678",
    email: "example@gmail.com",
    area: "台北市",
    price: "1000",
  },
];

import { useSettingStore } from "@/store/setting.js";

const settingStore = useSettingStore();
</script>

<template>
  <div class="main">
    <el-row :gutter="20">
      <el-col :span="24">
        <el-card :body-style="{ padding: '0px' }">
          <template #header>
            <div class="card-header">
              <span>人數統計</span>
            </div>
          </template>
          <div class="echarts" id="charts" ref="charts"></div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<style lang="less" scoped>
.dashboard-block {
  img {
    width: 100%;
  }
}

.echarts {
  width: 100%;
  height: 400px;
}
</style>
