Skip to content

Commit ceb0c66

Browse files
authored
Merge pull request #216 from labmlai/front-error-handle
bug fix: using value as smoothed
2 parents 0b4ca6e + 3b98e21 commit ceb0c66

File tree

1 file changed

+2
-3
lines changed
  • app/ui/src/components/charts/spark_lines

1 file changed

+2
-3
lines changed

app/ui/src/components/charts/spark_lines/chart.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export class SparkLines {
5151

5252
let idx = 0
5353
for (let s of this.currentSeries.concat(this.baseSeries)) {
54-
let series = s.series
5554
if (!this.uniqueItems.has(s.name)) {
5655
this.uniqueItems.set(s.name, idx++)
5756
}
@@ -65,11 +64,11 @@ export class SparkLines {
6564
let [smoothWindow, _] = getSmoothWindow(this.currentSeries, this.baseSeries, opt.smoothValue)
6665
for (let i = 0; i < this.currentSeries.length; i++) {
6766
let smoothedSeries = smoothSeries(this.currentSeries[i].series, smoothWindow[0][i])
68-
this.currentSmoothedValues.push(smoothedSeries.map(d => d.value))
67+
this.currentSmoothedValues.push(smoothedSeries.map(d => d.smoothed))
6968
}
7069
for (let i = 0; i < this.baseSeries.length; i++) {
7170
let smoothedSeries = smoothSeries(this.baseSeries[i].series, smoothWindow[0][1])
72-
this.baseSmoothedValues.push(smoothedSeries.map(d => d.value))
71+
this.baseSmoothedValues.push(smoothedSeries.map(d => d.smoothed))
7372
}
7473

7574
this.stepExtent = getExtent(this.currentSeries.concat(this.baseSeries).map(s => s.series), d => d.step)

0 commit comments

Comments
 (0)