Show mainplot configurations

This commit is contained in:
Matthias 2020-06-23 07:13:23 +02:00
parent 8b8693ae72
commit 42bbde2ed3

View File

@ -78,6 +78,27 @@ export default {
series: [], series: [],
}; };
if ('main_plot' in this.plotConfig) {
Object.entries(this.plotConfig.main_plot).forEach(([key, value]) => {
const col = this.dataset.columns.findIndex((el) => el === key);
subPlots.legend.push(key);
const sp = {
name: key,
type: 'line',
xAxisIndex: 0,
yAxisIndex: 0,
itemStyle: {
color: value.color,
},
encode: {
x: colDate,
y: col,
},
};
subPlots.series.push(sp);
});
}
if ('subplots' in this.plotConfig) { if ('subplots' in this.plotConfig) {
let plotIndex = 2; let plotIndex = 2;
Object.entries(this.plotConfig.subplots).forEach(([key, value]) => { Object.entries(this.plotConfig.subplots).forEach(([key, value]) => {