diff --git a/static/app/views/dashboards/dashboard.tsx b/static/app/views/dashboards/dashboard.tsx index 07457a8207181..c3fe5e4823385 100644 --- a/static/app/views/dashboards/dashboard.tsx +++ b/static/app/views/dashboards/dashboard.tsx @@ -54,7 +54,7 @@ import { } from './layoutUtils'; import SortableWidget from './sortableWidget'; import type {DashboardDetails, Widget} from './types'; -import {DashboardWidgetSource, WidgetType} from './types'; +import {DashboardWidgetSource, DisplayType, WidgetType} from './types'; import {connectDashboardCharts, getDashboardFiltersFromURL} from './utils'; export const DRAG_HANDLE_CLASS = 'widget-drag'; @@ -400,7 +400,10 @@ class Dashboard extends Component { isPreview, dashboardFilters: getDashboardFiltersFromURL(location) ?? dashboard.filters, - releaseSeries: this.props.releaseSeries, + releaseSeries: + widget.displayType === DisplayType.AREA || widget.displayType === DisplayType.LINE + ? this.props.releaseSeries + : undefined, }; const key = constructGridItemKey(widget); diff --git a/static/app/views/dashboards/widgetCard/chart.tsx b/static/app/views/dashboards/widgetCard/chart.tsx index a7c5f4d54ceff..34ad41d07ebcc 100644 --- a/static/app/views/dashboards/widgetCard/chart.tsx +++ b/static/app/views/dashboards/widgetCard/chart.tsx @@ -525,7 +525,12 @@ class WidgetCardChart extends Component { location.query.unselectedSeries = 'Releases'; legend.selected = getSeriesSelection(location); - const updatedReleaseSeries = releaseSeries ? releaseSeries : []; + const updatedReleaseSeries = + releaseSeries && + (widget.displayType === DisplayType.AREA || + widget.displayType === DisplayType.LINE) + ? releaseSeries + : []; return ( @@ -546,14 +551,11 @@ class WidgetCardChart extends Component { } : {}), legend, - series: - (this.props.organization.features.includes( - 'dashboards-releases-on-charts' - ) && - widget.displayType === 'line') || - widget.displayType === 'area' - ? [...series, ...updatedReleaseSeries] - : [...series], + series: this.props.organization.features.includes( + 'dashboards-releases-on-charts' + ) + ? [...series, ...updatedReleaseSeries] + : [...series], onLegendSelectChanged, forwardedRef, selection,