Fix fan chart gaps and task durations

This commit is contained in:
2026-04-01 22:36:11 +03:00
parent 439b86ce59
commit c2aecc6ce9
7 changed files with 183 additions and 33 deletions

View File

@@ -149,6 +149,19 @@ func TestChartCanvasHeight(t *testing.T) {
}
}
func TestNormalizeFanSeriesHoldsLastPositive(t *testing.T) {
got := normalizeFanSeries([]float64{4200, 0, 0, 4300, 0})
want := []float64{4200, 4200, 4200, 4300, 4300}
if len(got) != len(want) {
t.Fatalf("len=%d want %d", len(got), len(want))
}
for i := range want {
if got[i] != want[i] {
t.Fatalf("got[%d]=%v want %v", i, got[i], want[i])
}
}
}
func TestChartYAxisOption(t *testing.T) {
min := floatPtr(0)
max := floatPtr(100)