CN-65 fix: statistics-legend单位显示
This commit is contained in:
@@ -8,8 +8,8 @@
|
|||||||
<div v-for="(item,index) in data" :key="index" class="table-below-box">
|
<div v-for="(item,index) in data" :key="index" class="table-below-box">
|
||||||
<div class="table__below-color"><div :style="{backgroundColor: getChartColor(index)}"></div></div>
|
<div class="table__below-color"><div :style="{backgroundColor: getChartColor(index)}"></div></div>
|
||||||
<div class="table__below-title" :title="item.legend">{{item.legend}}</div>
|
<div class="table__below-title" :title="item.legend">{{item.legend}}</div>
|
||||||
<div class="table__below-statistics" :title="item.aggregation.avg">{{unitConvert(item.aggregation.avg)}}</div>
|
<div class="table__below-statistics" :title="item.aggregation.avg">{{unitConvert(item.aggregation.avg, chartInfo.params.unitType).join(' ')}}</div>
|
||||||
<div class="table__below-statistics" :title="item.aggregation.max">{{unitConvert(item.aggregation.max)}}</div>
|
<div class="table__below-statistics" :title="item.aggregation.max">{{unitConvert(item.aggregation.max, chartInfo.params.unitType).join(' ')}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -22,7 +22,8 @@ import unitConvert from '@/utils/unit-convert'
|
|||||||
export default {
|
export default {
|
||||||
name: 'StatisticsLegend',
|
name: 'StatisticsLegend',
|
||||||
props: {
|
props: {
|
||||||
data: Array
|
data: Array,
|
||||||
|
chartInfo: Object
|
||||||
},
|
},
|
||||||
setup () {
|
setup () {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
<pie-table :tableData="pieTableData" ref="pieTable" :chartInfo="chartInfo" :time-filter="timeFilter" :order="orderPieTable"/>
|
<pie-table :tableData="pieTableData" ref="pieTable" :chartInfo="chartInfo" :time-filter="timeFilter" :order="orderPieTable"/>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="isEchartsWithStatistics">
|
<template v-else-if="isEchartsWithStatistics">
|
||||||
<statistics-legend :data="statisticsData"></statistics-legend>
|
<statistics-legend :data="statisticsData" :chart-info="chartInfo"></statistics-legend>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</echarts-frame>
|
</echarts-frame>
|
||||||
|
|||||||
Reference in New Issue
Block a user