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] Horizontal bar visualizations sharing vertical axis are slightly offset on dashboard #118951

Open
jordansirwin opened this issue Nov 17, 2021 · 6 comments
Labels
blocked bug Fixes for quality problems that affect the customer experience Feature:ElasticCharts Issues related to the elastic-charts library Feature:Lens impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@jordansirwin
Copy link

jordansirwin commented Nov 17, 2021

Kibana version:
7.14.2

Elasticsearch version:
7.14.2

Server OS version:

Browser version:
Version 15.1 (16612.2.9.1.30, 16612)

Browser OS version:
macOS Big Sur (11.6)

Original install method (e.g. download page, yum, from source, etc.):
Elastic Cloud

Describe the bug:

If you have multiple Lens horizontal bar visualizations that would share a vertical axis positioned horizontally on a dashboard, the horizontal bars don’t line up exactly. Oddly, the offset seems change between the bars near the top and those near the bottom. It's only a few pixels, but it could be perfect :D

Not sure if this is due to show/hiding the legend or show/hiding the axis (or something else).

Steps to reproduce:

  1. Create multiple Lens visualizations using horizontal bar chart. These visualizations should share a vertical axis.
  2. Add the visualizations to a dashboard sharing the same horizontal row
  3. Hide the vertical axis on all but the left-most visualization (since they share the same values, it's wasteful to repeat the axis over and over)
  4. Note the left-most visualization that shows the vertical axis has horizontal bars offset slightly from the ones hiding the axis

Expected behavior:

I'd expect the alignment of bars to be the same across all visualizations to help cement they share the same axis.

Screenshots (if relevant):

Actual dashboard with redacted information:
image

Synthetic example showing same behavior:
image

See above example here https://codesandbox.io/s/trusting-wood-xd4hs

Errors in browser console (if relevant):
No errors

Provide logs and/or server output (if relevant):
No logs

Any additional context:

Removal of the axis labels causes the slight misalignment. A temporary fix could be hide title and use tickFormat = () => ''.

@jordansirwin jordansirwin added the bug Fixes for quality problems that affect the customer experience label Nov 17, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Nov 17, 2021
@nickofthyme nickofthyme added Feature:Lens Team:DataVis Team label for DataVis Team Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Nov 17, 2021
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/datavis (Team:DataVis)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Nov 17, 2021
@flash1293
Copy link
Contributor

It seems like this is something we want to solve via small multiples @ghudgins ?

@flash1293 flash1293 added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. blocked labels Nov 18, 2021
@flash1293
Copy link
Contributor

Probably blocked on #72063

@ghudgins
Copy link
Contributor

would be nice if having axis on/off wouldn't adjust the visualizations in panels.

but yeah - fixing via small multiples (or some of the elastic-charts concepts for shared axis, multi chart visualizations could be good threads to solve the core issue)

@flash1293 flash1293 changed the title Lens horizontal bar visualizations sharing vertical axis are slightly offset on dashboard [Lens] Horizontal bar visualizations sharing vertical axis are slightly offset on dashboard Nov 22, 2021
@markov00
Copy link
Member

markov00 commented Dec 6, 2021

This probably can also be solved without small multiples if we solve this elastic/elastic-charts#1179 first and few issues related to the axis label overflows.

@stratoula stratoula added Feature:ElasticCharts Issues related to the elastic-charts library and removed Team:DataVis Team label for DataVis Team labels Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked bug Fixes for quality problems that affect the customer experience Feature:ElasticCharts Issues related to the elastic-charts library Feature:Lens impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

7 participants