forked from cerc-io/cosmos-explorer
improve ux
This commit is contained in:
parent
e77a890798
commit
24d1f92bae
@ -52,6 +52,11 @@
|
|||||||
>
|
>
|
||||||
{{ formatTotalChange(calculateTotalChange) }} (24h)
|
{{ formatTotalChange(calculateTotalChange) }} (24h)
|
||||||
</small>
|
</small>
|
||||||
|
<span @click="refreshPrice()">
|
||||||
|
<feather-icon
|
||||||
|
icon="RefreshCwIcon"
|
||||||
|
size="12"
|
||||||
|
/></span>
|
||||||
<!-- chart -->
|
<!-- chart -->
|
||||||
<chart-component-doughnut
|
<chart-component-doughnut
|
||||||
:height="160"
|
:height="160"
|
||||||
@ -468,11 +473,17 @@ export default {
|
|||||||
},
|
},
|
||||||
calculateChartDoughnut() {
|
calculateChartDoughnut() {
|
||||||
const total = this.calculateByDenom
|
const total = this.calculateByDenom
|
||||||
|
const labels = []
|
||||||
|
const data = []
|
||||||
|
Object.entries(total.value).sort((a, b) => b[1] - a[1]).forEach(i => {
|
||||||
|
labels.push(i[0])
|
||||||
|
data.push(i[1])
|
||||||
|
})
|
||||||
return {
|
return {
|
||||||
datasets: [
|
datasets: [
|
||||||
{
|
{
|
||||||
labels: Object.keys(total.value),
|
labels,
|
||||||
data: Object.values(total.value),
|
data,
|
||||||
backgroundColor: chartColors(),
|
backgroundColor: chartColors(),
|
||||||
borderWidth: 0,
|
borderWidth: 0,
|
||||||
pointStyle: 'rectRounded',
|
pointStyle: 'rectRounded',
|
||||||
@ -513,6 +524,9 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
refreshPrice() {
|
||||||
|
this.$store.dispatch('chains/getQuotes')
|
||||||
|
},
|
||||||
init() {
|
init() {
|
||||||
this.accounts = getLocalAccounts()
|
this.accounts = getLocalAccounts()
|
||||||
const chains = getLocalChains()
|
const chains = getLocalChains()
|
||||||
|
Loading…
Reference in New Issue
Block a user