Skip to content

Commit a9daeb1

Browse files
authored
Fix error message on charts (#279)
* Make sure to clear the chart before each use. * Add key for v-for loop.
1 parent c8a501b commit a9daeb1

File tree

7 files changed

+11
-6
lines changed

7 files changed

+11
-6
lines changed

frontend/src/graph/ui/Chart.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ export default {
8080
getPluginGraphsGraph().then(({status, data}) => {
8181
if (+status === 0 && data.url) {
8282
this.graphUrl = data.url
83-
console.log("The url: " + this.graphUrl)
8483
this.addDragEventForImg();
8584
}
8685
});

frontend/src/histogram/Histogram.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
></ui-chart-page>
1010
<ui-chart-page
1111
v-for="item in groupedTags"
12+
:key="item.group"
1213
:config="config"
1314
:runsItems="runsItems"
1415
:tagList="item.tags"

frontend/src/histogram/ui/ChartPage.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
<ui-expand-panel :info="total" :title="title">
55
<div class="visual-dl-chart-page-box">
66
<ui-chart
7-
v-for="tag in filteredPageList"
8-
:tagInfo="tag"
7+
v-for="tagInfo in filteredPageList"
8+
:key="tagInfo.run + tagInfo.tag.displayName"
9+
:tagInfo="tagInfo"
910
:runs="config.runs"
1011
:chartType="config.chartType"
1112
:running="config.running"

frontend/src/histogram/ui/Config.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
></v-text-field>
99

1010
<v-radio-group label="Histogram mode" v-model="config.chartType" dark>
11-
<v-radio v-for="mode in chartTypeItems"
11+
<v-radio v-for="mode in chartTypeItems" :key="mode.name"
1212
:label="mode.name" :value="mode.value"></v-radio>
1313
</v-radio-group>
1414

frontend/src/images/ui/ChartPage.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<ui-image
55
class="visual-dl-chart-image"
66
v-for="tagInfo in filteredPageList"
7+
:key="tagInfo.run + tagInfo.tag.displayName"
78
:tagInfo="tagInfo"
89
:isActualImageSize="config.isActualImageSize"
910
:runs="config.runs"

frontend/src/scalars/ui/Chart.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ export default {
9494
this.setChartHorizon();
9595
},
9696
tagInfo: function(val) {
97+
// Should Clean up the chart before each use.
98+
this.myChart.clear();
9799
this.setChartsOptions(val);
98100
this.getOriginChartData(val);
99101
}

frontend/src/scalars/ui/ChartPage.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
<ui-expand-panel :info="tagList.length" :title="title">
44
<div ref="chartPageBox" class="visual-dl-chart-page-box">
55
<ui-chart
6-
v-for="tag in filteredTagList"
7-
:tagInfo="tag"
6+
v-for="tagInfo in filteredTagList"
7+
:tagInfo="tagInfo"
8+
:key="tagInfo.run + tagInfo.tag.displayName"
89
:groupNameReg="config.groupNameReg"
910
:smoothing="config.smoothing"
1011
:horizontal="config.horizontal"

0 commit comments

Comments
 (0)