mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 10:21:55 +00:00
Don't allow disabling of the only series in the chart
This commit is contained in:
parent
58c497b9a8
commit
f943385ce3
|
@ -28,6 +28,7 @@ import {
|
|||
} from '@/types';
|
||||
import { watchThrottled } from '@vueuse/core';
|
||||
import { computed, onMounted, ref, watch } from 'vue';
|
||||
import { formatPrice } from '@/shared/formatters';
|
||||
|
||||
use([
|
||||
BarChart,
|
||||
|
@ -200,8 +201,8 @@ function initializeChart() {
|
|||
const profit = params[0].data.profit;
|
||||
const currentProfit = params[0].data['currentProfit'];
|
||||
const profitText = currentProfit
|
||||
? `Projected profit (including unrealized): ${currentProfit}`
|
||||
: `Profit: ${profit}`;
|
||||
? `Projected profit (incl. unrealized): ${formatPrice(currentProfit, 3)}`
|
||||
: `Profit: ${formatPrice(profit, 3)}`;
|
||||
return profitText;
|
||||
},
|
||||
axisPointer: {
|
||||
|
@ -214,6 +215,7 @@ function initializeChart() {
|
|||
legend: {
|
||||
data: [CHART_PROFIT],
|
||||
right: '5%',
|
||||
selectedMode: false,
|
||||
},
|
||||
useUTC: false,
|
||||
xAxis: {
|
||||
|
|
|
@ -96,6 +96,7 @@ const chartOptions = computed((): EChartsOption => {
|
|||
legend: {
|
||||
data: [CHART_PROFIT],
|
||||
right: '5%',
|
||||
selectedMode: false,
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
|
|
Loading…
Reference in New Issue
Block a user