mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 10:21:55 +00:00
Hide small balances from Chart
This commit is contained in:
parent
c40660c2cb
commit
ce4208c452
|
@ -1,10 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<v-chart
|
<v-chart v-if="currencies" :option="balanceChartOptions" :theme="getChartTheme" autoresize />
|
||||||
v-if="balance.currencies"
|
|
||||||
:option="balanceChartOptions"
|
|
||||||
:theme="getChartTheme"
|
|
||||||
autoresize
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
@ -24,7 +19,7 @@ import {
|
||||||
TooltipComponent,
|
TooltipComponent,
|
||||||
} from 'echarts/components';
|
} from 'echarts/components';
|
||||||
|
|
||||||
import { BalanceInterface } from '@/types';
|
import { BalanceRecords } from '@/types';
|
||||||
import { formatPriceCurrency } from '@/shared/formatters';
|
import { formatPriceCurrency } from '@/shared/formatters';
|
||||||
|
|
||||||
use([
|
use([
|
||||||
|
@ -43,7 +38,7 @@ use([
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
export default class BalanceChart extends Vue {
|
export default class BalanceChart extends Vue {
|
||||||
@Prop({ required: true }) balance!: BalanceInterface;
|
@Prop({ required: true }) currencies!: BalanceRecords[];
|
||||||
|
|
||||||
@Prop({ default: false, type: Boolean }) showTitle!: boolean;
|
@Prop({ default: false, type: Boolean }) showTitle!: boolean;
|
||||||
|
|
||||||
|
@ -59,7 +54,7 @@ export default class BalanceChart extends Vue {
|
||||||
backgroundColor: 'rgba(0, 0, 0, 0)',
|
backgroundColor: 'rgba(0, 0, 0, 0)',
|
||||||
dataset: {
|
dataset: {
|
||||||
dimensions: ['balance', 'currency', 'est_stake', 'free', 'used', 'stake'],
|
dimensions: ['balance', 'currency', 'est_stake', 'free', 'used', 'stake'],
|
||||||
source: this.balance.currencies,
|
source: this.currencies,
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item',
|
trigger: 'item',
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<ShowIcon v-else :size="16" />
|
<ShowIcon v-else :size="16" />
|
||||||
</b-form-checkbox>
|
</b-form-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<BalanceChart :balance="balance" />
|
<BalanceChart v-if="balanceCurrencies" :currencies="balanceCurrencies" />
|
||||||
<div>
|
<div>
|
||||||
<p v-if="balance.note">
|
<p v-if="balance.note">
|
||||||
<strong>{{ balance.note }}</strong>
|
<strong>{{ balance.note }}</strong>
|
||||||
|
|
|
@ -9,7 +9,7 @@ export interface BalanceRecords {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BalanceInterface {
|
export interface BalanceInterface {
|
||||||
currencies: Array<BalanceRecords>;
|
currencies: BalanceRecords[];
|
||||||
note: string;
|
note: string;
|
||||||
/** Stake currency used */
|
/** Stake currency used */
|
||||||
stake: string;
|
stake: string;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user