2021-07-05 22:58:12 +08:00
|
|
|
<template>
|
2021-07-09 09:00:06 +08:00
|
|
|
<div class="chart__legend">
|
2021-07-09 18:15:15 +08:00
|
|
|
<div class="chart__table-top">
|
|
|
|
|
<div class="chart__table-box">
|
|
|
|
|
<div>Average</div>
|
|
|
|
|
<div>Maximum</div>
|
2021-07-08 08:57:29 +08:00
|
|
|
</div>
|
2021-07-09 18:15:15 +08:00
|
|
|
</div>
|
|
|
|
|
<div class="chart__table-below">
|
|
|
|
|
<div v-for="(item,index) in data" :key="index" class="table-below-box">
|
|
|
|
|
<div class="table-below-account">
|
2021-07-09 19:42:11 +08:00
|
|
|
<div :style="{backgroundColor: getChartColor(index)}" class="table__below-color" :title="getChartColor(index)"></div>
|
|
|
|
|
<div class="table__below-title" :title="item.legend">{{item.legend}}</div>
|
2021-07-09 18:15:15 +08:00
|
|
|
</div>
|
|
|
|
|
<div class="table__below-flashback">
|
2021-07-09 19:42:11 +08:00
|
|
|
<div class="table__below-max qq" :title="item.aggregation.max">{{item.aggregation.max}}</div>
|
|
|
|
|
<div class="table__below-avg qq" :title="item.aggregation.avg">{{item.aggregation.avg}}</div>
|
2021-07-09 18:15:15 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-07-08 08:57:29 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-07-09 09:00:06 +08:00
|
|
|
|
2021-07-05 22:58:12 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2021-07-08 08:57:29 +08:00
|
|
|
import { getChartColor } from '@/components/charts/chart-options'
|
|
|
|
|
import {chartColor} from "./chart-options";
|
2021-07-05 22:58:12 +08:00
|
|
|
export default {
|
|
|
|
|
name: 'StatisticsLegend',
|
|
|
|
|
props: {
|
|
|
|
|
data: Array
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
data: {
|
|
|
|
|
immediate: true,
|
|
|
|
|
deep: true,
|
|
|
|
|
handler (n) {
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-07-08 08:57:29 +08:00
|
|
|
},
|
|
|
|
|
setup () {
|
|
|
|
|
return {
|
|
|
|
|
getChartColor,
|
2021-07-09 10:10:06 +08:00
|
|
|
chartColor
|
|
|
|
|
}
|
2021-07-05 22:58:12 +08:00
|
|
|
}
|
|
|
|
|
}
|
2021-07-08 08:57:29 +08:00
|
|
|
|
2021-07-05 22:58:12 +08:00
|
|
|
</script>
|
2021-07-09 10:10:06 +08:00
|
|
|
<style lang="scss" scoped>
|
2021-07-09 09:00:06 +08:00
|
|
|
.chart__legend{
|
2021-07-08 16:23:11 +08:00
|
|
|
width: 455px;
|
|
|
|
|
height: 111px;
|
|
|
|
|
border: 1px solid #E7EAED;
|
2021-07-08 08:57:29 +08:00
|
|
|
font-size: 10px;
|
|
|
|
|
color:#5f6368;
|
|
|
|
|
margin: auto;
|
|
|
|
|
}
|
2021-07-09 18:15:15 +08:00
|
|
|
.chart__table-top{
|
2021-07-08 16:23:11 +08:00
|
|
|
width: 455px;
|
|
|
|
|
height: 30px;
|
2021-07-09 09:00:06 +08:00
|
|
|
border-bottom: #E7EAED 0.96px solid;
|
2021-07-09 18:15:15 +08:00
|
|
|
display: flex;
|
|
|
|
|
flex-direction:row-reverse;
|
|
|
|
|
.chart__table-box{
|
|
|
|
|
width: 185px;
|
|
|
|
|
height: 30px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-family: Roboto-Regular;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: #0091FF;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
}
|
2021-07-08 08:57:29 +08:00
|
|
|
}
|
2021-07-09 18:15:15 +08:00
|
|
|
.chart__table-below{
|
|
|
|
|
width: 455px;
|
2021-07-09 10:10:06 +08:00
|
|
|
height: calc(100% - 30px);
|
2021-07-09 19:42:11 +08:00
|
|
|
overflow: auto;
|
2021-07-09 18:15:15 +08:00
|
|
|
.table-below-box{
|
2021-07-09 10:10:06 +08:00
|
|
|
width: 100%;
|
2021-07-09 18:15:15 +08:00
|
|
|
display: flex;
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.table-below-account{
|
|
|
|
|
width: 310px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding-left: 16px;
|
|
|
|
|
}
|
|
|
|
|
.table__below-flashback{
|
|
|
|
|
width: 211px;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction:row-reverse;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.table-below-box:hover{
|
|
|
|
|
background-color: #f9f9f9;
|
|
|
|
|
border: 0;
|
|
|
|
|
color: #383838;
|
|
|
|
|
}
|
|
|
|
|
.table__below-color{
|
|
|
|
|
width: 17px;
|
|
|
|
|
height: 7px;
|
|
|
|
|
border-radius: 24%;
|
|
|
|
|
}
|
|
|
|
|
.table__below-title{
|
2021-07-09 19:42:11 +08:00
|
|
|
max-width: 226px;
|
2021-07-09 18:15:15 +08:00
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow:ellipsis;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
2021-07-09 19:42:11 +08:00
|
|
|
.qq{
|
|
|
|
|
width: 39px;
|
2021-07-09 10:10:06 +08:00
|
|
|
}
|
2021-07-09 09:00:06 +08:00
|
|
|
}
|
2021-07-07 15:51:52 +08:00
|
|
|
</style>
|