hide charts on initial state. use custom colors

This commit is contained in:
liangping 2021-10-08 09:33:03 +08:00
parent deda622125
commit 822196f90c
2 changed files with 8 additions and 3 deletions

View File

@ -354,6 +354,7 @@
</template> </template>
<script> <script>
import { $themeColors } from '@themeConfig'
import { import {
BCard, BAvatar, BPopover, BTable, BRow, BCol, BTableSimple, BTr, BTd, BTbody, BCardHeader, BCardTitle, BButton, BCardBody, VBModal, BCard, BAvatar, BPopover, BTable, BRow, BCol, BTableSimple, BTr, BTd, BTbody, BCardHeader, BCardTitle, BButton, BCardBody, VBModal,
BButtonGroup, VBTooltip, BPagination, BButtonGroup, VBTooltip, BPagination,
@ -364,7 +365,8 @@ import Ripple from 'vue-ripple-directive'
import VueQr from 'vue-qr' import VueQr from 'vue-qr'
import chainAPI from '@/libs/fetch' import chainAPI from '@/libs/fetch'
import { import {
formatToken, formatTokenAmount, formatTokenDenom, getStakingValidatorOperator, percent, tokenFormatter, toDay, toDuration, abbrMessage, abbrAddress, getUserCurrency, getUserCurrencySign, chartColors, formatToken, formatTokenAmount, formatTokenDenom, getStakingValidatorOperator, percent, tokenFormatter, toDay,
toDuration, abbrMessage, abbrAddress, getUserCurrency, getUserCurrencySign,
} from '@/libs/data' } from '@/libs/data'
import ObjectFieldComponent from './ObjectFieldComponent.vue' import ObjectFieldComponent from './ObjectFieldComponent.vue'
import OperationTransferComponent from './OperationTransferComponent.vue' import OperationTransferComponent from './OperationTransferComponent.vue'
@ -549,7 +551,7 @@ export default {
{ {
labels: Object.keys(data), labels: Object.keys(data),
data: Object.values(data), data: Object.values(data),
backgroundColor: chartColors, backgroundColor: [$themeColors.primary, $themeColors.success, $themeColors.warning, $themeColors.danger, $themeColors.info],
borderWidth: 0, borderWidth: 0,
pointStyle: 'rectRounded', pointStyle: 'rectRounded',
}, },

View File

@ -1,6 +1,9 @@
<template> <template>
<div class="text-center"> <div class="text-center">
<b-card border-variant="primary"> <b-card
v-if="calculateTotal > 0"
border-variant="primary"
>
<b-row class="mx-0"> <b-row class="mx-0">
<b-col <b-col
md="4" md="4"