diff options
| -rw-r--r-- | server/chart.go | 10 | ||||
| -rw-r--r-- | server/server.go | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/server/chart.go b/server/chart.go index b6c0471..f37e6ca 100644 --- a/server/chart.go +++ b/server/chart.go @@ -1,14 +1,14 @@ package main import ( + "fmt" + "github.com/wcharczuk/go-chart/v2" "log" "net/http" - "fmt" - "time" - "sync" "slices" "strings" - "github.com/wcharczuk/go-chart/v2" + "sync" + "time" ) type ChartHandler struct { @@ -89,7 +89,7 @@ func buildSeries(room RoomID, in <-chan Entry[Humidity], out chan<- chart.TimeSe y = append(y, float64(e.v)) } out <- chart.TimeSeries{ - Name: string(room), + Name: string(room), XValues: x, YValues: y, } diff --git a/server/server.go b/server/server.go index 8cfb1b0..0850b60 100644 --- a/server/server.go +++ b/server/server.go @@ -8,8 +8,8 @@ import ( ) const ( - addr = ":9090" - historySize = 10000 // Number of old samples to keep in memory. + addr = ":9090" + historySize = 10000 // Number of old samples to keep in memory. targetHumidityDefault = 35.0 ) |