elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.63k stars 8.23k forks source link

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

Open stratoula opened 1 week ago

stratoula commented 1 week ago

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 https://github.com/elastic/kibana/pull/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?

elasticmachine commented 1 week ago

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

elasticmachine commented 1 week ago

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

jughosta commented 1 week ago

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.

https://github.com/elastic/kibana/blob/f962cdcd796af9908449155c989dd03438165773/src/plugins/unified_histogram/public/services/lens_vis_service.ts#L573

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.