dataframe return value should include strategy

This commit is contained in:
Matthias 2020-07-31 07:30:49 +02:00
parent 81972b3a52
commit 443f571978
2 changed files with 10 additions and 8 deletions

View File

@ -50,8 +50,6 @@ const downBorderColor = '#8A0000';
components: { 'v-chart': ECharts, PlotConfigurator },
})
export default class CandleChart extends Vue {
@Prop({ required: true }) readonly pair!: string;
@Prop({ required: true }) readonly timeframe!: string;
@Prop({ required: true }) readonly timeframems!: number;
@ -79,11 +77,6 @@ export default class CandleChart extends Vue {
this.$bvModal.show('plotConfiguratorModal');
}
@Watch('pair')
pairChanged() {
this.signalsCalculated = false;
}
@Watch('timeframe')
timeframeChanged() {
this.signalsCalculated = false;
@ -94,6 +87,14 @@ export default class CandleChart extends Vue {
this.signalsCalculated = false;
}
get strategy() {
return this.dataset ? this.dataset.strategy : '';
}
get pair() {
return this.dataset ? this.dataset.pair : '';
}
get datasetColumns() {
return this.dataset ? this.dataset.columns : [];
}
@ -127,7 +128,7 @@ export default class CandleChart extends Vue {
const options: echarts.EChartOption = {
title: {
text: `${this.pair} - ${this.timeframe}`,
text: `${this.strategy} - ${this.pair} - ${this.timeframe}`,
show: true,
},
backgroundColor: '#231202D',

View File

@ -154,6 +154,7 @@ export interface PairHistoryPayload {
}
export interface PairHistory {
strategy: string;
pair: string;
columns: string[];
data: number[];