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

View File

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