-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] values on chart #69100
Comments
We actually already the option to show the bar value as a text label for bar charts only at the moment, |
Pinging @elastic/datavis (Feature:ElasticCharts) |
Pinging @elastic/kibana-app (Team:KibanaApp) |
@markov00 I think this issue is blocked by some of the rendering problems with value labels: |
This is closely related to another issue, is it worth having two separate issues for value labels? #55262 |
The Total text label is something different, so this needs to be a new ER on the elastic-chart repo. Except for the color contrast issue that can be fixed now (after the work done on the color contrast on partition charts) the overlapping issue is a bit more difficult to achieve. We will for sure work on that, but I'd like to describe a few best practices on that (mostly from Dona Wong) :
In the example proposed by Alona, the number of bars is significantly low that adding the value label is worth and increase the readability of the chart, we should try to allow the user add labels only on few cases if possible. I've updated the elastic/elastic-charts#454 with some notes. We probably should reconsider Labels as a first-class citizen in Charts more than a decorator for bars |
I think we can reduce the scope of this implementation to allowing value labels for single-series bar charts only, such as the ones shown in the original comment. Elastic-charts doesn't support labeling for line or area charts, and also has styling issue for multi-series bar charts. We have precedent for adding this kind of restriction to charts in Lens, because you can't use fitting functions on bar charts or stacked area charts, so we disable the feature. Do you think this reduction of scope would solve your original request @AlonaNadler? |
sounds good, I think it is a step in the right direction. |
As discussed in the meeting, for the short-term we will focus to implement this for unstacked bars only as a chart-level setting. Blocked on:
|
When charts are used as part of a dashboard or as a report. It often helps to have labels on the chart so users don't need to hover to read the value. Values on the chart can work in line, bar, area charts.
Example
example TSVB top N chart with values next to each bar

Lens for the same example

In the example it's easier to read the TSVB top N chart mainly due to the labels(labels can be on or outside the bar)
cc: @markov00
The text was updated successfully, but these errors were encountered: