fix: legend调整比例 样式调整
This commit is contained in:
@@ -383,7 +383,6 @@
|
|||||||
}
|
}
|
||||||
.legend-container {
|
.legend-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
@@ -391,12 +390,19 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.legend-item {
|
.legend-item {
|
||||||
|
box-sizing: border-box;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: inline-block;
|
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
color: $--color-text-primary;
|
color: $--color-text-primary;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.legend-name{
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.legend-item, .legend--table-row {
|
.legend-item, .legend--table-row {
|
||||||
&.legend-item--inactive, &.row--inactive {
|
&.legend-item--inactive, &.row--inactive {
|
||||||
@@ -429,12 +435,20 @@
|
|||||||
|
|
||||||
// 表格类型
|
// 表格类型
|
||||||
.legend--table {
|
.legend--table {
|
||||||
display: table;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
display: table;
|
||||||
|
table-layout: fixed;
|
||||||
|
|
||||||
|
.legend--table-body{
|
||||||
|
display: table-row-group;
|
||||||
|
}
|
||||||
|
|
||||||
.legend--table-row {
|
.legend--table-row {
|
||||||
display: table-row;
|
display: table-row;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
.legend--table-cell:not(:first-of-type){
|
||||||
|
width: 48px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.legend--table-row:not(:first-of-type):hover {
|
.legend--table-row:not(:first-of-type):hover {
|
||||||
background-color: $--background-color-1;
|
background-color: $--background-color-1;
|
||||||
@@ -443,23 +457,35 @@
|
|||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.legend--table-row:first-of-type {
|
.table-header {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
background-color: $--chart-background-color-base;
|
||||||
color:#33a2e5;
|
color:#33a2e5;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
.legend--table-cell:not(:first-of-type) {
|
.legend--table-cell:not(:first-of-type) {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.legend--table-cell{
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.legend--table-cell {
|
.legend--table-cell {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
word-break: break-all;
|
|
||||||
padding: 1px 5px;
|
padding: 1px 5px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
min-width: 50px;
|
.legend--table-box{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.legend-name{
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1136,7 +1162,6 @@
|
|||||||
.legend-wrap{
|
.legend-wrap{
|
||||||
padding: 5px 10px 5px 10px;
|
padding: 5px 10px 5px 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
justify-content: space-between;
|
|
||||||
.legend-resize{
|
.legend-resize{
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
background-color: $--border-color-light;
|
background-color: $--border-color-light;
|
||||||
@@ -1180,6 +1205,9 @@
|
|||||||
width: 2px;
|
width: 2px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.legend-container{
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1194,6 +1222,9 @@
|
|||||||
width: 2px;
|
width: 2px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.legend-container{
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
.legend-shape{
|
.legend-shape{
|
||||||
|
flex-shrink: 0;
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
margin-right:5px;
|
margin-right:5px;
|
||||||
border-radius:10px;
|
border-radius:10px;
|
||||||
|
|||||||
@@ -24,12 +24,18 @@
|
|||||||
@mouseleave="hoverLegend(item.name, index,'downplay')"
|
@mouseleave="hoverLegend(item.name, index,'downplay')"
|
||||||
>
|
>
|
||||||
<div :title="item.alias ? item.alias : item.name" class="legend--table-cell">
|
<div :title="item.alias ? item.alias : item.name" class="legend--table-cell">
|
||||||
|
<div class="legend--table-box">
|
||||||
<i v-if="isTimeSeries&&series[index].yAxisIndex==0" :style="{color: item.color}" class="yAxis-icon nz-icon nz-icon-zuozongzhou"></i>
|
<i v-if="isTimeSeries&&series[index].yAxisIndex==0" :style="{color: item.color}" class="yAxis-icon nz-icon nz-icon-zuozongzhou"></i>
|
||||||
<span v-else :style="{background: item.color}" class="legend-shape"></span>
|
<span v-else :style="{background: item.color}" class="legend-shape"></span>
|
||||||
<span :title="item.alias ? item.alias : item.name">{{item.alias ? item.alias : item.name}}</span>
|
<span :title="item.alias ? item.alias : item.name" class="legend-name">{{item.alias ? item.alias : item.name}}</span>
|
||||||
<i class="nz-icon nz-icon-override" @click.stop="onCopy(item.alias ? item.alias : item.name)" :title="$t('overall.copyText')"></i>
|
<i class="nz-icon nz-icon-override" @click.stop="onCopy(item.alias ? item.alias : item.name)" :title="$t('overall.copyText')"></i>
|
||||||
</div>
|
</div>
|
||||||
<div v-for="(statistics, index) in item.statistics" :key="index" :class="{'legend-item--inactive': isGrey[index]}" class="legend--table-cell">{{(keepTwoDecimalFull(statistics.value))}}</div>
|
</div>
|
||||||
|
<div v-for="(statistics, index) in item.statistics" :key="index" :class="{'legend-item--inactive': isGrey[index]}" class="legend--table-cell">
|
||||||
|
<div class="legend--table-box">
|
||||||
|
<span class="legend-name" :title="keepTwoDecimalFull(statistics.value, 'left')">{{keepTwoDecimalFull(statistics.value, 'left')}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 右y轴legend -->
|
<!-- 右y轴legend -->
|
||||||
<div
|
<div
|
||||||
@@ -43,12 +49,18 @@
|
|||||||
@mouseleave="hoverLegend(item.name, index,'downplay')"
|
@mouseleave="hoverLegend(item.name, index,'downplay')"
|
||||||
>
|
>
|
||||||
<div :title="item.alias ? item.alias : item.name" class="legend--table-cell">
|
<div :title="item.alias ? item.alias : item.name" class="legend--table-cell">
|
||||||
|
<div class="legend--table-box">
|
||||||
<i v-if="isTimeSeries&&series[index].yAxisIndex==1" :style="{color: item.color}" class="yAxis-icon nz-icon nz-icon-youzongzhou"></i>
|
<i v-if="isTimeSeries&&series[index].yAxisIndex==1" :style="{color: item.color}" class="yAxis-icon nz-icon nz-icon-youzongzhou"></i>
|
||||||
<span v-else :style="{background: item.color}" class="legend-shape"></span>
|
<span v-else :style="{background: item.color}" class="legend-shape"></span>
|
||||||
<span :title="item.alias ? item.alias : item.name">{{item.alias ? item.alias : item.name}}</span>
|
<span :title="item.alias ? item.alias : item.name" class="legend-name">{{item.alias ? item.alias : item.name}}</span>
|
||||||
<i class="nz-icon nz-icon-override" @click.stop="onCopy(item.alias ? item.alias : item.name)" :title="$t('overall.copyText')"></i>
|
<i class="nz-icon nz-icon-override" @click.stop="onCopy(item.alias ? item.alias : item.name)" :title="$t('overall.copyText')"></i>
|
||||||
</div>
|
</div>
|
||||||
<div v-for="(statistics, index) in item.statistics" :key="index" :class="{'legend-item--inactive': isGrey[index]}" class="legend--table-cell">{{(keepTwoDecimalFull(statistics.value, 'right'))}}</div>
|
</div>
|
||||||
|
<div v-for="(statistics, index) in item.statistics" :key="index" :class="{'legend-item--inactive': isGrey[index]}" class="legend--table-cell">
|
||||||
|
<div class="legend--table-box">
|
||||||
|
<span class="legend-name" :title="keepTwoDecimalFull(statistics.value, 'right')">{{keepTwoDecimalFull(statistics.value, 'right')}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -68,7 +80,7 @@
|
|||||||
>
|
>
|
||||||
<i v-if="isTimeSeries&&series[index].yAxisIndex==0" :style="{color: item.color}" class="yAxis-icon nz-icon nz-icon-zuozongzhou"></i>
|
<i v-if="isTimeSeries&&series[index].yAxisIndex==0" :style="{color: item.color}" class="yAxis-icon nz-icon nz-icon-zuozongzhou"></i>
|
||||||
<span v-else :style="{background: item.color}" class="legend-shape"></span>
|
<span v-else :style="{background: item.color}" class="legend-shape"></span>
|
||||||
<span>{{item.alias ? item.alias : item.name.split('-')[0]}}</span>
|
<span class="legend-name">{{item.alias ? item.alias : item.name.split('-')[0]}}</span>
|
||||||
<i class="nz-icon nz-icon-override" @click.stop="onCopy(item.alias ? item.alias : item.name.split('-')[0])" :title="$t('overall.copyText')"></i>
|
<i class="nz-icon nz-icon-override" @click.stop="onCopy(item.alias ? item.alias : item.name.split('-')[0])" :title="$t('overall.copyText')"></i>
|
||||||
</div>
|
</div>
|
||||||
<!-- 右y轴legend -->
|
<!-- 右y轴legend -->
|
||||||
@@ -85,7 +97,7 @@
|
|||||||
>
|
>
|
||||||
<i v-if="isTimeSeries&&series[index].yAxisIndex==1" :style="{color: item.color}" class="yAxis-icon nz-icon nz-icon-youzongzhou"></i>
|
<i v-if="isTimeSeries&&series[index].yAxisIndex==1" :style="{color: item.color}" class="yAxis-icon nz-icon nz-icon-youzongzhou"></i>
|
||||||
<span v-else :style="{background: item.color}" class="legend-shape"></span>
|
<span v-else :style="{background: item.color}" class="legend-shape"></span>
|
||||||
<span>{{item.alias ? item.alias : item.name.split('-')[0]}}</span>
|
<span class="legend-name">{{item.alias ? item.alias : item.name.split('-')[0]}}</span>
|
||||||
<i class="nz-icon nz-icon-override" @click.stop="onCopy(item.alias ? item.alias : item.name.split('-')[0])" :title="$t('overall.copyText')"></i>
|
<i class="nz-icon nz-icon-override" @click.stop="onCopy(item.alias ? item.alias : item.name.split('-')[0])" :title="$t('overall.copyText')"></i>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="log-detail">
|
<div class="log-detail">
|
||||||
<!-- <div :id="`logChart${tabIndex}`" class="log-chart" v-if="showSwitch"></div> -->
|
<!-- <div :id="`logChart${tabIndex}`" class="log-chart" v-if="showSwitch"></div> -->
|
||||||
<chart ref="logChart" class="log-chart" :unit="unit" :timeRange="timeRange"></chart>
|
<chart ref="logChart" style="margin-bottom: 5px;" class="log-chart" :unit="unit" :timeRange="timeRange"></chart>
|
||||||
<div class="log-chart chart-no-data" v-if="showSwitch&&noData" style="top: 150px">No data</div>
|
<div class="log-chart chart-no-data" v-if="showSwitch&&noData" style="top: 150px">No data</div>
|
||||||
<div class="log-operations" v-if="showSwitch">
|
<div class="log-operations" v-if="showSwitch">
|
||||||
<div class="log-operation">
|
<div class="log-operation">
|
||||||
|
|||||||
Reference in New Issue
Block a user