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][Lens] Use Lens suggestions to render useful charts #147472

Closed
stratoula opened this issue Dec 13, 2022 · 3 comments
Closed

[Discover][Lens] Use Lens suggestions to render useful charts #147472

stratoula opened this issue Dec 13, 2022 · 3 comments
Assignees
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:x-large Extra Large Level of Effort Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects

Comments

@stratoula
Copy link
Contributor

Describe the feature:
Right now in the dataview mode we show the Lens embeddable with a count and date histogram. User can also choose a breakdown field and have a terms aggregation.

On text based mode we don't show any chart.

image

The idea here is to use the Lens suggestion system and display even more useful charts to the users.

Dataview mode

Treat the fields selection as drag and drop fields in Lens. Lens suggestion system will propose the best aggregation for this fiend and eventually the best chart. Users can also select among different suggestions.

Text based mode

The logic is quite the same here but we don't have aggregations suggestion. Lens can suggest the best chart depending on the query and render this. A PoC for this has already been created #146384

In both modes users can navigate to Lens for more options and add the visualization to a dashboard.

This is a step forward for our seamless exploration and I think it will give great insights to the users that want to explore their data.

@stratoula stratoula added Feature:Discover Discover Application enhancement New value added to drive a business result Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) labels Dec 13, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@elasticmachine
Copy link
Contributor

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

@kibanamachine kibanamachine added this to Long-term goals in Lens Dec 13, 2022
@kibanamachine kibanamachine added this to Inbox in Discover Dec 13, 2022
@stratoula stratoula added impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:weeks labels Dec 19, 2022
@stratoula stratoula self-assigned this Jan 24, 2023
@stratoula stratoula added loe:x-large Extra Large Level of Effort and removed loe:weeks labels Jan 26, 2023
@timductive timductive removed the Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) label Jan 31, 2023
@kibanamachine kibanamachine removed this from Inbox in Discover Jan 31, 2023
stratoula added a commit that referenced this issue Mar 27, 2023
## Summary

Part of #147472

This PR adds the unified histogram on the text based mode in Discover
and depicts Lens suggestions to the users. The users can navigate from
it to Lens for further exploration and adding the viz into a dashboard.


![discover](https://user-images.githubusercontent.com/17003240/222077814-33422fe1-4dc1-4861-b9af-681062412b59.gif)

Some notes:
- Lens now exposes a new api to fetch the suggestions from a text based
query. Later it can also be used to return suggestions for the dataview
mode (the other part of the aforementioned issue)
- Lens visualizations have been updated to return the correct
previewIcon (the majority of them were using the empty icon and not the
icon that represents them). This icon appears on the visualization
selection dropdown
- When Lens suggests a table, then the chart is not displayed (Discover
already offers a table view)
- The legacy metric is excluded from the suggestions as it is not
compatible with the text based languages.
- The text based languages are treated a bit differently on the unified
histogram as they do not work with search sessions.
- This feature is on technical preview, so we can iterate more on that
on later esql milestones. This is the first iteration required for the
milestone 1.
- The ESQL search strategy has a default size of 1000
https://github.com/elastic/kibana/blob/main/src/plugins/data/common/search/expressions/essql.ts#L113
which means that this is the max rows that we retrieve. I am keeping the
default as is irrelevant from the PR. In ESQL this limitation doesn't
exist so I think we are fine.

**Flaky test runner**:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1972

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
@stratoula
Copy link
Contributor Author

stratoula commented Mar 30, 2023

The ESQL part is done, I am closing this. I will create a new one for the dataview mode suggestions

@stratoula stratoula added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Mar 30, 2023
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:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:x-large Extra Large Level of Effort Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
No open projects
Lens
  
Long-term goals
Development

No branches or pull requests

3 participants