RightViewContent.vue 1.12 KB
<!-- 太阳膜右侧下面两个盒子里面内容
饼图左右结构都可用这个组件
-->
<template>
  <div class="main-box">
    <pie-chart class="pie-chart" :id="chart.id" :list="listData" :keys="chart.keys" :formatter="chart.formatter" :formatterName="chart.formatterName" :height="chart.height" :colors="chart.colors" :formtUnit="chart.formtUnit"></pie-chart>
    <Legend class="legend" :list="listData" :legentList="legentList" :colors="legendColors"></Legend>
  </div>
</template>

<script>
export default {
  name: 'RightViewContent',
  props: {
    chart: {
      type: Object,
      default: () => {}
    },
    listData: {
      type: Array,
      default: () => []
    },
    legentList: {
      type: Array,
      default: () => []
    },
    legendColors: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {}
  },

  mounted() {},

  methods: {}
}
</script>

<style lang="scss" scoped>
.main-box {
  display: flex;
  align-items: center;
  .pie-chart {
    // width: 138px;
    // height: 138px;
    // margin-top: 2.44vh;
    width: 20%;
  }
  .legend {
    // flex: 1;
    width: 65%;
  }
}
</style>