diff --git a/src/components/charts/CandleChartContainer.vue b/src/components/charts/CandleChartContainer.vue index 1dc28c87..7e35d6e8 100644 --- a/src/components/charts/CandleChartContainer.vue +++ b/src/components/charts/CandleChartContainer.vue @@ -132,7 +132,7 @@ const dataset = computed((): PairHistory => { }); const strategyName = computed(() => props.strategy || dataset.value?.strategy || ''); const datasetColumns = computed(() => (dataset.value ? dataset.value.columns : [])); -const hasDataset = computed(() => !!dataset.value); +const hasDataset = computed(() => dataset.value && dataset.value.data.length > 0); const isLoadingDataset = computed((): boolean => { if (props.historicView) { return botStore.activeBot.historyStatus === LoadingStatus.loading; diff --git a/src/stores/ftbot.ts b/src/stores/ftbot.ts index 233e90f9..8cc6cc67 100644 --- a/src/stores/ftbot.ts +++ b/src/stores/ftbot.ts @@ -340,7 +340,7 @@ export function createBotSubStore(botId: string, botName: string) { }, getPairCandles(payload: PairCandlePayload) { if (payload.pair && payload.timeframe) { - this.historyStatus = LoadingStatus.loading; + this.candleDataStatus = LoadingStatus.loading; return api .get('/pair_candles', { params: { ...payload }, @@ -354,11 +354,11 @@ export function createBotSubStore(botId: string, botName: string) { data: result.data, }, }; - this.historyStatus = LoadingStatus.success; + this.candleDataStatus = LoadingStatus.success; }) .catch((err) => { console.error(err); - this.historyStatus = LoadingStatus.error; + this.candleDataStatus = LoadingStatus.error; }); } // Error branchs