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
6 changes: 5 additions & 1 deletion static/app/components/events/searchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
Field,
FIELD_TAGS,
isAggregateField,
isEquation,
isMeasurement,
TRACING_FIELDS,
} from 'app/utils/discover/fields';
Expand Down Expand Up @@ -101,7 +102,10 @@ class SearchBar extends React.PureComponent<SearchBarProps> {
const functionTags = fields
? Object.fromEntries(
fields
.filter(item => !Object.keys(FIELD_TAGS).includes(item.field))
.filter(
item =>
!Object.keys(FIELD_TAGS).includes(item.field) && !isEquation(item.field)
)
.map(item => [item.field, {key: item.field, name: item.field}])
)
: {};
Expand Down
5 changes: 4 additions & 1 deletion static/app/utils/discover/eventView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,10 @@ class EventView {
return uniqBy(
this.getAggregateFields()
// Only include aggregates that make sense to be graphable (eg. not string or date)
.filter((field: Field) => isLegalYAxisType(aggregateOutputType(field.field)))
.filter(
(field: Field) =>
isLegalYAxisType(aggregateOutputType(field.field)) && !isEquation(field.field)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wmak would equations ever show up as y-axis options in Dashboards?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They will, this is temporary until I add support on the event-stats endpoint for equations, and I'll format it correctly when I add it back, right now this is appearing like this
image

)
.map((field: Field) => ({label: field.field, value: field.field}))
.concat(CHART_AXIS_OPTIONS),
'value'
Expand Down