Newer
Older
carbon-metering-front / src / views / count / components / carbonGather.vue
liyaguang on 27 Mar 2023 619 bytes feat(*): 电力碳核算页面
<!-- 碳排汇总柱状图 -->
<script lang="ts" setup>
import lineChart from './BarChart.vue'
const data = ref<any[]>([])
setTimeout(() => {
  data.value = [
    {
      name: 'test1',
      data: [320, 302, 301, 334, 390, 330, 320],
    },
    {
      name: 'test2',
      data: [32, 307, 30, 34, 30, 300, 37],
    },
  ]
}, 1000 * 3)
const xAxisData = ref([
  '周一', '周二', '周三', '周四', '周五', '周六', '周日 ',
])
</script>

<template>
  <div style="width: 30%;">
    <div>碳排汇总</div>
    <line-chart
      :data="data"
      width="400px"
      height="400px"
    />
  </div>
</template>