Skip to content

Commit 376d277

Browse files
authored
fix(dashboards): Calculate bucket size from known good data (#101201)
Gross one! `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.
1 parent 0d886b3 commit 376d277

File tree

1 file changed

+1
-1
lines changed
  • static/app/views/dashboards/widgetCard

1 file changed

+1
-1
lines changed

static/app/views/dashboards/widgetCard/chart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ function WidgetCardChart(props: WidgetCardChartProps) {
265265
const durationUnit = isDurationChart
266266
? timeseriesResults && getDurationUnit(timeseriesResults, legendOptions)
267267
: undefined;
268-
const bucketSize = getBucketSize(timeseriesResults);
268+
const bucketSize = getBucketSize(series);
269269

270270
const valueFormatter = (value: number, seriesName?: string) => {
271271
const decodedSeriesName = seriesName

0 commit comments

Comments
 (0)