Newer
Older
CloudBrainNew / src / views / socialLive / components / community / components / houseBar.vue
StephanieGitHub on 4 Feb 2021 1 KB first commit
<!--
 * @Description:各类房屋数量
 * @Author: 王晓颖
 * @Date: 2020-11-24 11:15:40
 -->
<template>
  <!--<single-layout title="年龄分布">-->
  <div style="width: 100%;height:100%;padding:0.1rem">
    <colorful-bar-chart
      :id="options.id"
      :unit="options.unit"
      :height="options.height"
      :xAxisData="options.xAxisData"
      :seriesData="options.seriesData"
    />
  </div>
  <!--</single-layout>-->
</template>

<script>
import SingleLayout from '@/components/layout/singleLayout'
import ColorfulHorizontalBarChart from '@/components/barChart/colorfulHorizontalBarChart'
import ColorfulBarChart from '@/components/barChart/colorfulBarChart'
export default {
  name: 'houseBar',
  components: {ColorfulBarChart, ColorfulHorizontalBarChart, SingleLayout},
  data () {
    return {
      options: {
        id: 'house-bar',
        height: '100%',
        width: '100%',
        unit: '',
        xAxisData: ['自住', '出租', '空置', '商用', '其他'],
        seriesData: [34, 15, 10, 8, 5]
      }
    }
  },
  created () {
    this.getData()
  },
  methods: {
    getData () {
      // fetchCasebyFrom().then(response => {
      //   if (response.code === 200) {
      //     const data = response.data
      //     this.options.xAxisData = data.map(item => { return item.name })
      //     this.options.seriesData = data.map(item => { return item.value })
      //   }
      // })
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>

</style>