mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 13:05:15 +00:00
Fix Bad balance chart
This commit is contained in:
parent
1cfc06415d
commit
e9ad00d59b
|
@ -25,6 +25,7 @@ import {
|
||||||
} from 'echarts/components';
|
} from 'echarts/components';
|
||||||
|
|
||||||
import { BalanceInterface } from '@/types';
|
import { BalanceInterface } from '@/types';
|
||||||
|
import { formatPriceCurrency } from '@/shared/formatters';
|
||||||
|
|
||||||
use([
|
use([
|
||||||
PieChart,
|
PieChart,
|
||||||
|
@ -62,6 +63,12 @@ export default class BalanceChart extends Vue {
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item',
|
trigger: 'item',
|
||||||
|
formatter: (params) => {
|
||||||
|
console.log(params);
|
||||||
|
return `${formatPriceCurrency(params.value.balance, params.value.currency, 8)}<br />${
|
||||||
|
params.percent
|
||||||
|
}% (${formatPriceCurrency(params.value.est_stake, params.value.stake)})`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// legend: {
|
// legend: {
|
||||||
// orient: 'vertical',
|
// orient: 'vertical',
|
||||||
|
@ -73,9 +80,10 @@ export default class BalanceChart extends Vue {
|
||||||
{
|
{
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: ['40%', '70%'],
|
radius: ['40%', '70%'],
|
||||||
|
|
||||||
encode: {
|
encode: {
|
||||||
x: 'est_stake',
|
value: 'est_stake',
|
||||||
itemName: ['currency'],
|
itemName: 'currency',
|
||||||
tooltip: ['balance', 'currency'],
|
tooltip: ['balance', 'currency'],
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user