Skip to content

Commit

Permalink
UIChart widget bug fixes: revisited
Browse files Browse the repository at this point in the history
  • Loading branch information
gayanSandamal committed Sep 3, 2024
1 parent c907133 commit a6251fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/src/widgets/ui-chart/UIChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,10 @@ export default {
// ensure we have a datapoint for the relevant series
const data = Array(sLabels.length).fill({})
if (xIndex === -1) {
data[xLabels.length] = datapoint
// Add the new x-value to xLabels
xLabels.push(datapoint.x)
// Assign the datapoint to the new index (last position)
data[xLabels.length - 1] = datapoint
} else {
data[xIndex] = datapoint
}
Expand Down

0 comments on commit a6251fc

Please sign in to comment.