From 510661f12a36dfec60fc3a2c17cdfe69ad8c5d9d Mon Sep 17 00:00:00 2001 From: George Gritsouk <989898+gggritso@users.noreply.github.com> Date: Wed, 8 Oct 2025 16:06:01 -0400 Subject: [PATCH] Get bucket size from filtered series `timeseriesResults` is a sparse array. In cases where the _first_ element in the array is missing, the bucket size calculation failed, crashing the chart. Instead, run the bucket size calculation on `series` which is a filtered list of `Series` that are defined. --- static/app/views/dashboards/widgetCard/chart.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/views/dashboards/widgetCard/chart.tsx b/static/app/views/dashboards/widgetCard/chart.tsx index e3bf5809e4f82b..50a7d9c4b4ee4f 100644 --- a/static/app/views/dashboards/widgetCard/chart.tsx +++ b/static/app/views/dashboards/widgetCard/chart.tsx @@ -265,7 +265,7 @@ function WidgetCardChart(props: WidgetCardChartProps) { const durationUnit = isDurationChart ? timeseriesResults && getDurationUnit(timeseriesResults, legendOptions) : undefined; - const bucketSize = getBucketSize(timeseriesResults); + const bucketSize = getBucketSize(series); const valueFormatter = (value: number, seriesName?: string) => { const decodedSeriesName = seriesName