<script setup lang="ts">
import { onMounted, ref } from "vue";
import Echart from "/@/components/BaseEchart/index.vue";
import { startChart } from "/@/components/BaseEchart/option";
const options = ref<any>([]);
const loading = ref(false);

onMounted(async () => {
  options.value = startChart({
    type: "bar",
    xname: ["名字", "名字", "名字", "名字"],
    series: [1500, 2000, 3000, 4000],
    title: "名字",
  });
});
</script>

<template>
  <div class="chart-container">
    <Echart
      :loading="loading"
      :options="options"
      :style="{ width: '200px', height: '200px' }"
    />
  </div>
</template>

<style scoped></style>
