File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
viplab-standalone-frontend-vue/src/components/csv-plots Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ export default {
55
55
},
56
56
data () {
57
57
return {
58
- csvs: this .csvsProp ,
58
+ csvs: this .csvsProp , // this is bad! csvs will never get updated!!
59
59
fileIndex: 0 ,
60
60
data: [],
61
61
layout: {
@@ -137,18 +137,17 @@ export default {
137
137
xkey = this .labelProp .key
138
138
}
139
139
}
140
-
141
- console .log (xkey)
142
140
143
141
// multiply x-axis by factor if given
144
142
if (this .labelProp .factor !== undefined ) {
145
143
for (let j = 0 ; j < obj[(xkey)].length ; j++ ) {
146
144
obj[(xkey)][j] = obj[(xkey)][j] * this .labelProp .factor
147
145
}
148
146
}
149
-
150
- delete keys[xkey]
151
-
147
+ let xkey_ind = keys .indexOf (xkey)
148
+ if (xkey_ind > - 1 ) {
149
+ keys .splice (xkey_ind, 1 );
150
+ }
152
151
// create traces to be rendered later; the first column is always x; the others are ys
153
152
for (var k = 0 ; k < keys .length ; k++ ) {
154
153
if (this .datasetProp .key ) {
@@ -177,6 +176,7 @@ export default {
177
176
}
178
177
179
178
// set x-Axis label and title
179
+ // TODO: allow title in metadata? (id in dumux web-app)
180
180
let lastIndex = this .csvs [this .fileIndex ].lastIndexOf (' /' );
181
181
let title = ((this .areUrlsProp ) ? this .csvs [this .fileIndex ].substr (lastIndex + 1 , this .csvs [this .fileIndex ].length ) : " Graph" );
182
182
let xformat = (this .labelProp .format ) ? this .labelProp .format : " .1f"
You can’t perform that action at this time.
0 commit comments