Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discover][ES|QL] Brushing a timeseries should keep the preferred chart configuration #198749

Open
stratoula opened this issue Nov 4, 2024 · 3 comments
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application Feature:ES|QL ES|QL related features in Kibana impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:ESQL ES|QL related features in Kibana

Comments

@stratoula
Copy link
Contributor

Describe the feature:

In Discover we are computing the interval based on the timepicker. And we rename the column with this intgerval in the name. Although this PR improves the experience a lot #197453 it doesnt solve it for the brushing. The reason is because different interval means different column name which means that the suggestions will re run.

We could fix it with 2 ways?

  • flag the brushing and when this happens send the preferredChart type and attributes in the suggestions api. Not sure how easy is to understand that the change of the query was caused from brushing
  • Change the attributes of the histogram to give the name in the x axis instead of the column. So the esql query will always have the same column name but the vis attributes will change depending on the interval.
@stratoula stratoula added Feature:Discover Discover Application Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana labels Nov 4, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-esql (Team:ESQL)

@stratoula stratoula added the enhancement New value added to drive a business result label Nov 4, 2024
@kertal kertal added the impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. label Nov 4, 2024
@jughosta
Copy link
Contributor

jughosta commented Nov 4, 2024

Any changes in the time range filter can result in a different time interval for ES|QL histogram. So it's not only when brushing but also for manual updates.

`| EVAL timestamp=DATE_TRUNC(${queryInterval}, ${dataView.timeFieldName}) | stats results = count(*) by timestamp${breakdown}${sortBy} | rename timestamp as \`${dataView.timeFieldName} every ${queryInterval}\``

Change the attributes of the histogram to give the name in the x axis instead of the column. So the esql query will always have the same column name but the vis attributes will change depending on the interval.

I think this solution would be the best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application Feature:ES|QL ES|QL related features in Kibana impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:ESQL ES|QL related features in Kibana
Projects
None yet
Development

No branches or pull requests

4 participants