Skip to content

Commit

Permalink
dont merge payload+datapoint twice
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve-Mcl committed Sep 24, 2024
1 parent a2ed6c2 commit 71f6b33
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions ui/src/widgets/ui-chart/UIChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -315,19 +315,15 @@ export default {
}
dd.category = d.category[i]
dd.y = d.y[i]
this.addPoint(payload, dd, label[i])
this.addToChart(d, label)
this.commit(payload, dd, label[i])
}
} else {
this.addPoint(payload, datapoint, label)
this.addToChart(d, label)
this.commit(payload, datapoint, label)
}
},
addPoint (payload, datapoint, label) {
const d = {
...datapoint,
...payload
}
this.addToChart(d, label)
commit (payload, datapoint, label) {
// APPEND our latest data point to the store
this.$store.commit('data/append', {
widgetId: this.id,
Expand Down

0 comments on commit 71f6b33

Please sign in to comment.