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

[Lens] Presence Of Dual Chart Selectors Is Confusing #163721

Closed
MichaelMarcialis opened this issue Aug 11, 2023 · 9 comments · Fixed by #178971
Closed

[Lens] Presence Of Dual Chart Selectors Is Confusing #163721

MichaelMarcialis opened this issue Aug 11, 2023 · 9 comments · Fixed by #178971
Assignees
Labels
enhancement New value added to drive a business result Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@MichaelMarcialis
Copy link
Contributor

Currently, Lens offers two means with which users can change their current visualization type: 1) at the global-level via the selector above the visualization workspace, and 2) at the layer-level via the selector at the top of each layer panel. The global-level selector allows users to select from all visualization types (notifying them whether the different chart types are compatible based on their current visualization configuration). The layer-level selector(s) only show for visualizations that support multiple visualization layers and then only allow users to select from compatible visualizations.

While I can understand the original thought process for the use of two visualization type selectors at different scopes, it doesn’t change the fact that this is incredibly confusing for new users, and adds unnecessary weight to an already weighty interface. I’d like to suggest removing the global-level visualization selector altogether and instead only offering layer-level visualization type selectors. In doing so, we would allow users to select from the full list of visualizations in the layer-level selectors and notify them of any incompatibilities (similar to how we do currently for the global selector).

CleanShot 2023-08-11 at 09 56 59

@MichaelMarcialis MichaelMarcialis added discuss enhancement New value added to drive a business result Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Aug 11, 2023
@elasticmachine
Copy link
Contributor

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

@dej611
Copy link
Contributor

dej611 commented Aug 11, 2023

How would that work for multiple layers?

@MichaelMarcialis
Copy link
Contributor Author

MichaelMarcialis commented Aug 11, 2023

How would that work for multiple layers?

@dej611: Exactly how the global visualization selector works when multiple visualization layers are in play. The only difference here is that the user has more control over which layer's configuration would get transferred over to new, incompatible visualization types.

@stratoula
Copy link
Contributor

stratoula commented Aug 11, 2023

Yes this makes sense to me. I am not sure if it is confusing to do this per layer but I guess a poc will make it more clear. So for example if I have a bar layer and a line layer I can change the chart type in both layers but any selection except from XY will lose the configuration on both layers

@drewdaemon
Copy link
Contributor

++ this proposal makes sense to me.

@stratoula
Copy link
Contributor

stratoula commented Sep 29, 2023

I want to raise the priority here for 2 reasons:

  1. We now offer inline editing on all our Lens charts. Instead of having one chart switcher for the XY charts and a generic chart switcher I suggest to merge them in one. I would like to be able to switch among all the different charts that the Lens chart supports.
image
  1. This will be super usefull for ES|QL. Right now we are offering very few suggestions while we could actually allow the users to select among all supported chart types and make the ES|QL usage even more powerful.

I see 2 phases:

Phase 1: Use only the generic chart switcher in the inline editing flyouts
Phase 2: Redesign Lens editor to offer only one switcher.

@stratoula stratoula added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed discuss labels Sep 29, 2023
@stratoula stratoula added the Feature:ES|QL ES|QL related features in Kibana label Dec 18, 2023
@stratoula stratoula removed the Feature:ES|QL ES|QL related features in Kibana label Dec 18, 2023
@mbondyra mbondyra self-assigned this Mar 11, 2024
@MichaelMarcialis
Copy link
Contributor Author

MichaelMarcialis commented Mar 19, 2024

Additionally, when we get around to removing the "global" visualization selector from Lens (and instead use only layer-level visualization selectors), we should also probably update the current user flow for adding new layers. Currently when the users add a new visualization layer, we immediately add the new layer with the default visualization type selected (vertical bar stacked). Instead, we should have a second level in the "add layer" context menu that allows the user to only add those visualization types that support multiple layers. Happy to provide design support if this description isn't sufficient.

@stratoula
Copy link
Contributor

@mbondyra do you need additional design support from Michael here?

@mbondyra
Copy link
Contributor

I think I can try working on it without the design and ask for feedback later. I like this idea, but I also prefer to tackle it separately from the chart switch issue 🙏🏼

mbondyra added a commit that referenced this issue Mar 26, 2024
## Summary

This PR combines the chart type selection options into a single,
layer-based chart switch. This improves the user experience by
streamlining the process of switching between chart types in Lens
visualizations.

Fixes #163721
<img width="1365" alt="Screenshot 2024-03-25 at 10 46 24"
src="https://github.com/elastic/kibana/assets/4283304/cc36220e-aea0-4e4d-9436-948265f185a1">

Functionality:

Multilayer Charts: Switching to a compatible option (e.g., vertical bar
to line) will only convert that specific layer.
Multilayer Charts: Switching to incompatible, multilayer option (e.g.,
horizontal to vertical) will convert all layers to the new type.
Multilayer to Single Layer: Switching to a single-layer chart type (line
-> pie) will create the new chart based on the layer where you clicked
the dropdown.

Benefits:

Simpler Interface: Reduces confusion by offering a single, unified way
to switch chart types.
Improved Workflow: Makes it easier to customize individual layers or
switch the entire visualization type.

Note: In Discover, due some architectural problems, we can only convert
to compatible types so the chart switch is limited:
<img width="483" alt="Screenshot 2024-03-25 at 11 19 02"
src="https://github.com/elastic/kibana/assets/4283304/ffd60e19-18c9-443a-87ce-27e111f1bdf4">
<img width="493" alt="Screenshot 2024-03-25 at 11 19 07"
src="https://github.com/elastic/kibana/assets/4283304/9b5d31ed-105a-4515-8d96-4fd291a3b427">
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:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
6 participants