Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ import {t} from 'app/locale';
import space from 'app/styles/space';
import {GlobalSelection, Organization} from 'app/types';
import trackAdvancedAnalyticsEvent from 'app/utils/analytics/trackAdvancedAnalyticsEvent';
import {DisplayModes} from 'app/utils/discover/types';
import withApi from 'app/utils/withApi';
import withGlobalSelection from 'app/utils/withGlobalSelection';
import {Widget} from 'app/views/dashboardsV2/types';
import {eventViewFromWidget} from 'app/views/dashboardsV2/utils';
import {DisplayType} from 'app/views/dashboardsV2/widget/utils';
import Input from 'app/views/settings/components/forms/controls/input';

export type DashboardWidgetQuerySelectorModalOptions = {
Expand Down Expand Up @@ -45,6 +47,13 @@ class DashboardWidgetQuerySelectorModal extends React.Component<Props> {
discoverLocation.query.yAxis = query.fields
.filter(field => yAxisOptions.includes(field))
.slice(0, 3);
switch (widget.displayType) {
case DisplayType.BAR:
discoverLocation.query.display = DisplayModes.BAR;
break;
default:
break;
}
return (
<React.Fragment key={index}>
<QueryContainer>
Expand Down
3 changes: 3 additions & 0 deletions static/app/views/dashboardsV2/widgetCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ class WidgetCard extends React.Component<Props> {
case DisplayType.WORLD_MAP:
discoverLocation.query.display = DisplayModes.WORLDMAP;
break;
case DisplayType.BAR:
discoverLocation.query.display = DisplayModes.BAR;
break;
default:
break;
}
Expand Down