Skip to content

[Metrics][Discover] Default to optimal chart type (Line vs Area) for time-series queries #236261

@miguel-sanchez-elastic

Description

@miguel-sanchez-elastic

Description

The current Suggestion API logic defaults to standard bar charts or generic configurations that do not suit time-series data well. We need to modify the Suggestion API logic specifically for time-series queries. The goal is to intelligently switch between Area and Line charts based on data complexity, ensuring parity with the Metrics grid and preventing readability issues.

Acceptance criteria

  • Modify the Suggestion API to detect time-series (TS) specific queries
  • Update the default response for TS queries to return Line or Area charts instead of Bar charts
    • If the query is a TS query for just one metric with no breakdown, return an Area chart configuration
    • If the query is a TS query for more than one metric or with a breakdown, return of a Line chart configuration to avoid stacking issues
  • Ensure non-time-series queries remain unaffected by this change

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions