Set plotconfig name in vuex correctly

This commit is contained in:
Matthias 2020-08-24 20:20:54 +02:00
parent b6ffbc512f
commit a8cba2538d
2 changed files with 8 additions and 1 deletions

View File

@ -22,7 +22,7 @@
<b-checkbox v-model="useUTC" title="Use UTC for graph">useUtc</b-checkbox>
</div>
<div class="col-mb-2 mr-3">
<b-button size="sm" title="Plot configurator" @click="showConfigurator"> &#9881; </b-button>
<b-button size="sm" title="Plot configurator" @click="showConfigurator">&#9881;</b-button>
</div>
</div>
<CandleChart
@ -64,6 +64,8 @@ export default class CandleChartContainer extends Vue {
@ftbot.State availablePlotConfigNames!: Array<string>;
@ftbot.Action setPlotConfigName;
get datasetColumns() {
return this.dataset ? this.dataset.columns : [];
}
@ -74,7 +76,9 @@ export default class CandleChartContainer extends Vue {
}
plotConfigChanged() {
console.log('plotConfigChanged');
this.plotConfig = getCustomPlotConfig(this.plotConfigName);
this.setPlotConfigName(this.plotConfigName);
}
showConfigurator() {

View File

@ -223,6 +223,9 @@ export default {
.then((result) => commit('updatePlotConfig', result.data))
.catch(console.error);
},
setPlotConfigName({ commit }, plotConfigName: string) {
commit('updatePlotConfigName', plotConfigName);
},
getStrategyList({ commit }) {
return api
.get('/strategies')