Skip to content

[Lens][ES|QL] Re-running the query should keep the selected configuration if possible #186366

@stratoula

Description

@stratoula

Describe the feature:

Right now, every time a user submits a query in the editor, the Lens suggestions api runs and suggests a new chart. This results in changed made in the visualization level to be lost.

It would be cool if we could at least prioritize the activeVisualization chart Type and some of the configuration if is valid. The type will be very easy as the suggestions api can already do it (with the preferredChartType property). The visualization state is lost though (colors, legend settings etc).

We need to:

  • ask from the suggestions api to prirotize the current visualizationType
  • check if the query hasn't introduced major changes in the columns (check that the used columns in the datasourceState are being returned from the new query and in that case not change the chart (so keep the config)
  • if the columns are different we can just keep the visualization type and render the attributes returned from the suggestions api.

Metadata

Metadata

Assignees

Labels

Feature:ES|QLES|QL related features in KibanaTeam:ESQLES|QL related features in Kibana t//Team:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//enhancementNew value added to drive a business resultimpact:mediumAddressing this issue will have a medium level of impact on the quality/strength of our product.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions