File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
viplab-standalone-frontend-vue/src Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ export default {
151
151
for (let k = 0 ; k < keys .length ; k++ ) {
152
152
if (this .datasetProp .key ) {
153
153
// multiply y-axis by factor if given
154
- if (keys[k] === this .datasetProp .key ) {
154
+ if (keys[k] === this .datasetProp .key || this . datasetProp . key . includes (keys[k]) ) {
155
155
if (this .datasetProp .factor !== undefined ) {
156
156
for (let j = 0 ; j < obj[(xkey)].length ; j++ ) {
157
157
obj[(keys[k])][j] = obj[(keys[k])][j] * this .datasetProp .factor ;
@@ -160,7 +160,7 @@ export default {
160
160
const trace = {
161
161
x: obj[(xkey)],
162
162
y: obj[(keys[k])],
163
- name: this .datasetProp .label ,
163
+ name: ( typeof this .datasetProp .key == ' string ' ) ? this . datasetProp . label : keys[k] ,
164
164
};
165
165
traces .push (trace);
166
166
}
Original file line number Diff line number Diff line change 668
668
</div >
669
669
</div >
670
670
<!-- plots -->
671
- <label class =" mr-2" for =" csvConfig.plots" >Information about the Y-Axes : </label >
671
+ <label class =" mr-2" for =" csvConfig.plots" >Information about the Y-Axis : </label >
672
672
<div class =" d-flex ml-4 mr-4" >
673
673
<div class =" flex-grow-1" >
674
674
<label class =" mr-2" for =" csvConfig.plots" >Define multiple Plots generated from one CSV: </label >
687
687
<!-- key -->
688
688
<div class =" d-flex form-group" >
689
689
<div class =" flex-grow-1" >
690
- <label class =" mr-2" for =" csvPlot.key" >Key of Y-Axes in CSV: </label >
690
+ <label class =" mr-2" for =" csvPlot.key" >Key(s) of Y-Axis in CSV: </label >
691
691
</div >
692
692
<!-- Delete CSV-Config -->
693
693
<div class =" tooltip-icon pl-2" @click =" removePlot($event, csvConfig, csvPlot)" >
700
700
</div >
701
701
<!-- tooltip -->
702
702
<div class =" tooltip-icon pl-2" >
703
- <b-icon-info-circle v-tooltip.top-center =" 'Key for y-axis given in csv header.'" ></b-icon-info-circle >
703
+ <b-icon-info-circle v-tooltip.top-center =" 'Key(s) for y-axis given in csv header.'" ></b-icon-info-circle >
704
704
</div >
705
705
</div >
706
706
<!-- label -->
Original file line number Diff line number Diff line change 82
82
"type" : " object" ,
83
83
"properties" : {
84
84
"key" : {
85
- "type" : " string" ,
85
+ "type" : [ " string" , " array " ] ,
86
86
"minLength" : 1 ,
87
- "description" : " key for y-axis given in csv header"
87
+ "description" : " key(s) for y-axis given in csv header"
88
88
},
89
89
"label" : {
90
90
"type" : " string" ,
Original file line number Diff line number Diff line change 341
341
class =" outPartcontent"
342
342
>
343
343
<div v-if =" artifact.plots" >
344
- <div v-for =" plot in artifact.plots" :key =" plot.key" >
344
+ <div v-for =" plot in artifact.plots" :key =" (typeof plot.key == 'string') ? plot.key : plot.key[0] " >
345
345
<csv-plot
346
346
:csvsProp =artifact.urlsOrContents
347
347
:areUrlsProp =" false"
420
420
</div >
421
421
<div v-else-if =" artifact.MIMEtype == 'text/csv'" >
422
422
<div v-if =" artifact.plots" >
423
- <div v-for =" plot in artifact.plots" :key =" plot.key" >
423
+ <div v-for =" plot in artifact.plots" :key =" (typeof plot.key == 'string') ? plot.key : plot.key[0] " >
424
424
<csv-plot
425
425
:csvsProp =artifact.urlsOrContents
426
426
:areUrlsProp =" true"
You can’t perform that action at this time.
0 commit comments