diff --git a/src/views/Graphs.vue b/src/views/Graphs.vue index 0a0d3d64..19cf13cf 100644 --- a/src/views/Graphs.vue +++ b/src/views/Graphs.vue @@ -34,6 +34,13 @@ +
+ + + + + + +
@@ -44,6 +51,9 @@
Add
+
+ Show +
@@ -63,6 +73,7 @@ import { Component, Vue } from 'vue-property-decorator'; import { namespace } from 'vuex-class'; import CandleChart from '@/components/ftbot/CandleChart.vue'; import randomColor from '../shared/randomColor'; +import { PlotConfig } from '../store/types'; const ftbot = namespace('ftbot'); @@ -80,12 +91,15 @@ export default class Graphs extends Vue { selField = ''; + newSubplotName = ''; + plotOption = 'main_plot'; selColor = randomColor(); // Custom plot config - manually changed by user. - customPlotConfig = {}; + // eslint-disable-next-line @typescript-eslint/camelcase + customPlotConfig: PlotConfig = { main_plot: {}, subplots: {} }; @ftbot.State history; @@ -144,6 +158,16 @@ export default class Graphs extends Vue { this.selColor = randomColor(); console.log(this.customPlotConfig); } + + addSubplot() { + this.customPlotConfig.subplots = { + ...this.customPlotConfig.subplots, + [this.newSubplotName]: {}, + }; + this.selField = this.newSubplotName; + this.newSubplotName = ''; + console.log(this.customPlotConfig); + } }