Add Timeframe-select to Graphs

This commit is contained in:
Matthias 2021-05-23 16:57:39 +02:00
parent 0426045f77
commit b8d7fa809b

View File

@ -7,13 +7,14 @@
<div v-if="historicView" class="mx-3 mt-2 d-flex"> <div v-if="historicView" class="mx-3 mt-2 d-flex">
<TimeRangeSelect v-model="timerange" class="col-md-4 mr-2"></TimeRangeSelect> <TimeRangeSelect v-model="timerange" class="col-md-4 mr-2"></TimeRangeSelect>
<StrategyList v-model="strategy" class="col-md-3"></StrategyList> <StrategyList v-model="strategy" class="col-md-3"></StrategyList>
<TimeframeSelect v-model="selectedTimeframe" />
</div> </div>
<div class="flex-fill mx-2 mt-1"> <div class="flex-fill mx-2 mt-1">
<CandleChartContainer <CandleChartContainer
:available-pairs="historicView ? pairlist : whitelist" :available-pairs="historicView ? pairlist : whitelist"
:historic-view="historicView" :historic-view="historicView"
:timeframe="timeframe" :timeframe="historicView ? selectedTimeframe : timeframe"
:trades="trades" :trades="trades"
:timerange="historicView ? timerange : ''" :timerange="historicView ? timerange : ''"
:strategy="historicView ? strategy : ''" :strategy="historicView ? strategy : ''"
@ -28,6 +29,7 @@ import { Component, Vue } from 'vue-property-decorator';
import { namespace } from 'vuex-class'; import { namespace } from 'vuex-class';
import CandleChartContainer from '@/components/charts/CandleChartContainer.vue'; import CandleChartContainer from '@/components/charts/CandleChartContainer.vue';
import TimeRangeSelect from '@/components/ftbot/TimeRangeSelect.vue'; import TimeRangeSelect from '@/components/ftbot/TimeRangeSelect.vue';
import TimeframeSelect from '@/components/ftbot/TimeframeSelect.vue';
import StrategyList from '@/components/ftbot/StrategyList.vue'; import StrategyList from '@/components/ftbot/StrategyList.vue';
import { AvailablePairPayload, AvailablePairResult, WhitelistResponse } from '@/types'; import { AvailablePairPayload, AvailablePairResult, WhitelistResponse } from '@/types';
import { BotStoreGetters } from '@/store/modules/ftbot'; import { BotStoreGetters } from '@/store/modules/ftbot';
@ -35,7 +37,7 @@ import { BotStoreGetters } from '@/store/modules/ftbot';
const ftbot = namespace('ftbot'); const ftbot = namespace('ftbot');
@Component({ @Component({
components: { CandleChartContainer, StrategyList, TimeRangeSelect }, components: { CandleChartContainer, StrategyList, TimeRangeSelect, TimeframeSelect },
}) })
export default class Graphs extends Vue { export default class Graphs extends Vue {
historicView = true; historicView = true;
@ -44,6 +46,8 @@ export default class Graphs extends Vue {
timerange = ''; timerange = '';
selectedTimeframe = '';
@ftbot.State pairlist; @ftbot.State pairlist;
@ftbot.State whitelist; @ftbot.State whitelist;