elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.82k stars 8.21k forks source link

Lens is not ordering legends and tooltips properly when stacked series is present #127237

Open martinmontane opened 2 years ago

martinmontane commented 2 years ago

Kibana version: 7.17.0 Elasticsearch version: 7.17.0 Server OS version: Ubuntu 18.04 Browser version: Chrome 99.0.4844.51 Browser OS version: Mac OS Monterrey 12.2.1 Original install method (e.g. download page, yum, from source, etc.): Pulled from Dockerhub's Elastic official container images

Describe the bug: When creating a TSVB vizualization and mixing one or more "stacked" with one or more "none" stack time series, "stacked" series labels are always shown first in the legend a tooltips, even when specifically ordered

Steps to reproduce:

  1. Create a TSVB vizualization with two series: one with "stacked" and one with "none" in the stack property
  2. Put the "none" one first in the order of time series
  3. Check the tooltip and legend label position. labels of the "stacked" series are always shown first

Expected behavior: I would expect that the ordering of the time series work independently of the stacked property value

elasticmachine commented 2 years ago

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

flash1293 commented 2 years ago

I can reproduce this. @elastic/datavis This seems to be an elastic-charts limitation, could you have a look? I made sure the individual series are always passed in in the same order.

Also reproducible in Lens

markov00 commented 2 years ago

@flash1293 this is actually a limitation on our end, we first show stacked bars and then non-stacked ones. It was always like that in elastic-charts, but as for the legend, we can expose that sorting logic, or align in the way the configuration was given. We have a meta issue collecting these requests: https://github.com/elastic/elastic-charts/issues/860

martinmontane commented 2 years ago

Hey, thank you for checking my bug report so quickly. I think it's worth noting that in ELK 7.9.2 we did not have this bug.