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] Default legend size to fixed #129474

Closed
Tracked by #118429 ...
ghudgins opened this issue Apr 5, 2022 · 11 comments · Fixed by #130336
Closed
Tracked by #118429 ...

[Lens] Default legend size to fixed #129474

ghudgins opened this issue Apr 5, 2022 · 11 comments · Fixed by #130336
Assignees
Labels
discuss Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure usability

Comments

@ghudgins
Copy link
Contributor

ghudgins commented Apr 5, 2022

Describe the feature:
Update the Lens/Agg-based visualizations to use a fixed legend by default

Describe a specific use case for the feature:
When I'm building a dashboard with multiple vertically arranged visualizations (common)
I need legend size to default to a fixed size instead of auto
So I can avoid having to set legend size on every visualization to get a consistent layout

Design questions: CC @gvnmagni @MichaelMarcialis

  • What size should be default? Medium? Any concerns?
@ghudgins ghudgins added usability Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Apr 5, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@MichaelMarcialis
Copy link
Contributor

I need legend size to default to a fixed size instead of auto
So I can avoid having to set legend size on every visualization to get a consistent layout

Is the thinking here that we would do away with "Auto" as an option for visualization legend width in Lens (and instead apply one of the static options such as "Medium" as the default)? If so, that sounds good off the top of my head.

With the removal of "Auto," it would also allow us to add prepend and append buttons to allow users the ability quickly decrease/increase legend width on the width selector (similar to how we do for metric text size).

image

CCing @markov00 as well, as we talked about it briefly in a past comment thread.

@markov00
Copy link
Member

markov00 commented Apr 5, 2022

I'm a big fan of a consistent and aligned design but, as commented in multiple places, I think we should consider this option at the dashboard level, not at a single chart level because:

  • you will not get a "consistent layout" on your preexisting dashboard or not with any new dashboard that are using pre-existing visualizations. You have to manually change each legend configuration on every chart you have already built. If you are considering switching every "auto" configured legend to a fixed size, I want to warn you that some users may not like that change.
  • As already commented: a per-chart configuration works fine only under a dashboard and a set of composed visualization with the same configs. If you start reusing the same chart in multiple dashboards you may end up having different configurations in different dashboards, reflecting wrongly the changes here and there (exactly the same problem we have today with data formatters at the indices level)
  • changing of the layout panels is done exclusively at the dashboard level and only there you have a global overview of what is going on and how to align things together

@ghudgins
Copy link
Contributor Author

ghudgins commented Apr 5, 2022

I see these as separate things but something we should start to track. We have a number of dashboard-level visualization overrides mentioned in the past as well (palettes and color by term surfaced similar feedback). I can track down existing issues with @teresaalvarezsoler and get back to you on the dashboard level overrides.

we already support setting sizes at the chart level today - this is about defaults...I think it's okay to have individual level settings for the cases where you're exploring from a non-dashboard context...but dashboard level overrides would be a great tool to make getting the right consistent look much much easier as you mention

@markov00
Copy link
Member

markov00 commented Apr 5, 2022

What I'm saying is that specifying a static default value doesn't solve the problem mentioned in this issue:

When I'm building a dashboard with multiple vertically stacked visualizations (common)
I need legend size to default to a fixed size instead of auto
So I can avoid having to set legend size on every visualization to get a consistent layout

your problem here is to avoid set legend size on every visualization to get a consistent layout. Adding now a static default to legend doesn't solve the issue on pre-existing charts, nor it solves for the future ones if the user manually changes that value.

I think it's okay to have individual level settings for the cases where you're exploring from a non-dashboard context.

When you are exploring from a non-dashboard context (basically only within Lens) users doesn't really care about resizing the legend: the auto setting should be a good default choice most of the time, except for very long labels where the user can adjust the size if case.

@ghudgins
Copy link
Contributor Author

ghudgins commented Apr 5, 2022

your problem here is to avoid set legend size on every visualization to get a consistent layout. Adding now a static default to legend doesn't solve the issue on pre-existing charts, nor it solves for the future ones if the user manually changes that value.

agree - only solves for new dashboards. but it does help with alignment by default without the larger overarching feature?

When you are exploring from a non-dashboard context (basically only within Lens) users doesn't really care about resizing the legend: the auto setting should be a good default choice most of the time, except for very long labels where the user can adjust the size if case.

it's a good point. I am not sure if it would be weird to start introducing some visual options in one place and not the other. will be a good one to think through.

@markov00
Copy link
Member

markov00 commented Apr 5, 2022

agree - only solves for new dashboards

new dashboards and new visualizations

but it does help with alignment by default without the larger overarching feature?

IMHO not as much as the dashboard level manual configuration or an automatic one that automatically aligns all legends to a nice size for all.

@teresaalvarezsoler
Copy link

Having level-dashboard settings to build consistent visualizations makes sense to me. However, when a legend is set as default, it has always the same size for all the charts created, doesn't it? I can't reproduce the issue here, do you have a screenshot?

Some other questions @ghudgins :

  • What is the context of this request (customer/s asked for it -how often?-, something you observed...)?
  • How "common" is having multiple stack visualizations? I guess this starts to makes sense for more than 5 viz, do we expect this is the case for 80%, 50%, 10% of dashboard users? (making this assumption will help us prioritize if we don't have the data)
  • Why only Stacked bar charts? There are other visualizations with legends too.

Thanks

@ghudgins
Copy link
Contributor Author

ghudgins commented Apr 6, 2022

What is the context of this request (customer/s asked for it -how often?-, something you observed...)?

A few users on discuss and one user on the community slack were upset when we changed from vislib (old datavis library) to elastic-charts for the pie chart because the new one had an "Auto" legend and was causing alignment issues.

How "common" is having multiple stack visualizations? I guess this starts to makes sense for more than 5 viz, do we expect this is the case for 80%, 50%, 10% of dashboard users? (making this assumption will help us prioritize if we don't have the data)

(My answer is broadly - see "stack" clarification below) - I don't have a percentage but venturing a guess that stacking similar visualizations vertically is fairly common - would guess @ 50% but it's not very scientific at all 😅

Why only Stacked bar charts? There are other visualizations with legends too.

Any legend - when I say "stack" here I'm referring to putting them on top of each other. my apologies for the bad word choice!

@flash1293
Copy link
Contributor

Discussed offline - for now we can go with setting the legend width to a fixed value by default and taking away the "auto" setting. For existing visualizations auto will stay in place, but it's not possible to configure for new visualizations.

@markov00
Copy link
Member

markov00 commented Apr 7, 2022

can you please add telemetry to that? it will be great to know what is the ratio of users changing the default legend size?
It will be great if we can correlate this to the time the visualization was created, to partially understand if that change was caused by a subsequent usage of the chart, or was intentional during the single chart creation/analysis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure usability
Projects
None yet
7 participants