Skip to content

Commit 923c09e

Browse files
authored
feat(dashboards): allow a single equation on a chart (#103783)
This addresses the problem of using equations with a significantly different scale of events than the default `count()` series.
1 parent ad4eceb commit 923c09e

File tree

1 file changed

+5
-1
lines changed
  • static/app/views/dashboards/widgetBuilder/components/visualize

1 file changed

+5
-1
lines changed

static/app/views/dashboards/widgetBuilder/components/visualize/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,11 @@ function Visualize({error, setError}: VisualizeProps) {
440440
const isOnlyFieldOrAggregate =
441441
fields.length === 2 &&
442442
field.kind !== FieldValueKind.EQUATION &&
443-
fields.some(fieldItem => fieldItem.kind === FieldValueKind.EQUATION);
443+
fields.some(fieldItem => fieldItem.kind === FieldValueKind.EQUATION) &&
444+
// The spans dataset can have a single equation, so isOnlyFieldOrAggregate
445+
// is not applicable. The errors dataset requires one series to be
446+
// selected for equations to work.
447+
state.dataset !== WidgetType.SPANS;
444448

445449
// Depending on the dataset and the display type, we use different options for
446450
// displaying in the column select.

0 commit comments

Comments
 (0)