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

Better support for long values #41418

Closed
AlonaNadler opened this issue Jul 17, 2019 · 10 comments
Closed

Better support for long values #41418

AlonaNadler opened this issue Jul 17, 2019 · 10 comments
Assignees
Labels
Feature:ElasticCharts Issues related to the elastic-charts library Feature:Lens Feature:Visualizations Generic visualization features (in case no more specific feature label is available) Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@AlonaNadler
Copy link

AlonaNadler commented Jul 17, 2019

Often in beats the field names are very long with more than 10 characters, in these cases, it is hard to recognize the fields in the visualization, dashboard and discover

see legend in this image:
image
Many times users can see the complete field name if hovering on the field but it takes too long for the tooltip to appear and it only shows one field where sometimes users need to compare between fields with only a few characters differ in their names

A way to present either prefix sufix or something in the middle which will help read these fields
In the example above it would have been more helpful to see intra-per...v5q28, infra-per..v8k64
In addition, if the tooltip will appear faster on hovering will help as well

@elastic/kibana-app

@Bargs Bargs added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Jul 19, 2019
@timroes timroes added the Feature:ElasticCharts Issues related to the elastic-charts library label Aug 6, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/datavis (Feature:ElasticCharts)

@timroes timroes added the Feature:Visualizations Generic visualization features (in case no more specific feature label is available) label Aug 6, 2020
@AlonaNadler AlonaNadler changed the title Better support for long field names Better support for long value names May 13, 2021
@AlonaNadler AlonaNadler changed the title Better support for long value names Better support for long values May 13, 2021
@ghudgins
Copy link

+1 on this...especially if paired with #95079 on line charts

@wylieconlon
Copy link
Contributor

Since there's already a discussion about truncating labels, maybe we can discuss the opposite in this issue: How can we show the full label without truncation?

  • Resizable legend?
  • Scrollable legend
  • Legend is a separate HTML element?

cc @markov00 any ideas on how to show very long text in the legend?

@markov00
Copy link
Member

Since there's already a discussion about truncating labels, maybe we can discuss the opposite in this issue: How can we show the full label without truncation?

  • Resizable legend?
  • Scrollable legend
  • Legend is a separate HTML element?

All these are viable options, together with the "central" truncation infra-per..v8k64
We are collecting requirements on redesigning the legend here: elastic/elastic-charts#580

I'd also like to add another point of view about this issue: is there a way to simplify and reduce those very long texts? there are situations where not all the text brings useful information and can be simplified.
In this issue description, for example, I can see that the infra-petclinic- is repeated for each item, this doesn't bring additional information to the items and can probably, I say probably, removed from the label itself, leaving the text with something like :cli-v8k64 server-1235
I'm perfectly aware that this is not always the case, but a simplified renaming-mapping mechanism can be very useful in numerous cases.

@flash1293
Copy link
Contributor

@markov00 About your re-mapping idea - I think it's a cool approach if we can make it easy to configure (or even working without any user intervention). However I can't really imagine how it look like - you probably still need the infra-petclinic label somewhere in the chart to set the context, right?

@markov00
Copy link
Member

@markov00 About your re-mapping idea - I think it's a cool approach if we can make it easy to configure (or even working without any user intervention). However I can't really imagine how it look like - you probably still need the infra-petclinic label somewhere in the chart to set the context, right?

Right, that part can probably be pushed to the chart title for example.
The editing experience can happen directly starting from the legend item, like it is for changing the series colors (not sure if this works right now in Lens, but Visualize works like that), or from the axis label if showing a categorical chart
These are just examples, but we should investigate it more and find a good UX for that kind of editor

@ghudgins
Copy link

+1 from cloud observability teams

It’s quite common to have legends get cut off since many of our labels are fairly long (example, instance-0000002). A graphing solution with better support for longer labels or the ability to massage labels at view time would be helpful.

@ghudgins
Copy link

ghudgins commented Aug 5, 2021

With elastic/elastic-charts#1285 we now have a clear picture of how we can address this issue (enable multi line legends). This does not exclude other solution ideas represented in the elastic-charts legends meta issue which will be tracked separately. We did attempt the middle ... but found it disrupted critical copy/paste behavior.

Requirements for this issue (please edit these if we change our mind)

  • Expose this multi line option in the "Editor toolbar" / "Legend menu"
  • All existing objects before this change we should assume this option is off
  • Sensible default: All new objects should enable this option so they better reflow as values get longer
  • We should watch out for interactions of this feature and "Legend in chart" as well as "Value in legend"

CC @stratoula & @MichaelMarcialis, this is a high priority for 7.15

@nickofthyme
Copy link
Contributor

nickofthyme commented Aug 7, 2021

@stratoula the required changes are now in master (#107842). The theme now exposes an option called maxLabel (i.e. theme.legend.labelOptions.maxLines). This option expects a number to limit labels line count, where 0 is infinity or unconstrained. Let us know if you have any questions. Here is an example usage.

Screen Recording 2021-08-06 at 05 02 36 PM

@stratoula
Copy link
Contributor

Thanx @nickofthyme! I will check what we can do and discuss it with @MichaelMarcialis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ElasticCharts Issues related to the elastic-charts library Feature:Lens Feature:Visualizations Generic visualization features (in case no more specific feature label is available) Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

10 participants