Make UTC selection dynamic

This commit is contained in:
Matthias 2020-07-28 20:39:42 +02:00
parent c5e1144e9d
commit c78dc26aba

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="container-fluid d-flex flex-column align-items-stretch d-flex"> <div class="container-fluid flex-column align-items-stretch d-flex">
<b-modal <b-modal
id="plotConfiguratorModal" id="plotConfiguratorModal"
title="Plot Configurator" title="Plot Configurator"
@ -9,10 +9,15 @@
> >
<PlotConfigurator :columns="datasetColumns" v-model="plotConfig" /> <PlotConfigurator :columns="datasetColumns" v-model="plotConfig" />
</b-modal> </b-modal>
<div class="col-mb-2 ml-auto position-relative"> <div class="row ml-auto">
<b-button class="mt-5" @click="showConfigurator" size="sm" title="Plot configurator"> <div class="col-mb-2 mr-2">
&#9881; <b-checkbox v-model="useUTC" title="Use UTC for graph">useUtc</b-checkbox>
</b-button> </div>
<div class="col-mb-2 mr-3">
<b-button @click="showConfigurator" size="sm" title="Plot configurator">
&#9881;
</b-button>
</div>
</div> </div>
<div class="row flex-grow-1 chart-wrapper"> <div class="row flex-grow-1 chart-wrapper">
<v-chart v-if="hasData" theme="dark" autoresize :options="chartOptions" /> <v-chart v-if="hasData" theme="dark" autoresize :options="chartOptions" />
@ -57,6 +62,8 @@ export default class CandleChart extends Vue {
plotConfig: PlotConfig = { ...EMPTY_PLOTCONFIG }; plotConfig: PlotConfig = { ...EMPTY_PLOTCONFIG };
useUTC = true;
// Only recalculate buy / sell data if necessary // Only recalculate buy / sell data if necessary
signalsCalculated = false; signalsCalculated = false;
@ -124,7 +131,7 @@ export default class CandleChart extends Vue {
show: true, show: true,
}, },
backgroundColor: '#231202D', backgroundColor: '#231202D',
useUTC: true, useUTC: this.useUTC,
dataset: { dataset: {
source: this.dataset.data, source: this.dataset.data,
}, },