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] Support two y-axis for visualizing data in different scale #53663

Closed
AlonaNadler opened this issue Dec 20, 2019 · 7 comments · Fixed by #69911
Closed

[Lens] Support two y-axis for visualizing data in different scale #53663

AlonaNadler opened this issue Dec 20, 2019 · 7 comments · Fixed by #69911
Assignees
Labels
Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@AlonaNadler
Copy link

Describe the feature:
Currently, in Lens you can visualize multiple y-axis on all the same left y-axes scale. Often users need to combine series with a different scale. We want to add the ability to add another y-axis on the right side.

For every chart in Lens the default y-axes will be on the left side. Users will have the ability to decide to use another y-axis on the right side and define which series uses which axis (left y-axes or right)
image
This capability only exists on y-axis series.

@timroes timroes added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Jan 9, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@VijayDoshi
Copy link

With two y-axis it is useful to have an option to "synchronize" the scale to the greatest common denominator vs. having them use auto-generated independent scales. Both modes are useful.

@timroes
Copy link
Contributor

timroes commented Feb 20, 2020

@markov00 is this synchronize something you think Elastic chart should do, or rather Kibana itself by calculating/providing the correct axes ranges?

@markov00
Copy link
Member

markov00 commented Mar 2, 2020

@timroes sorry for the late reply, we already have that option, that compute an extended domain that use the minimum value of the minimum domain values, and the max of the maximum domain values of both scales. The prop is useDefaultGroupDomain and I think we are already using this in TSVB.

@timroes
Copy link
Contributor

timroes commented Mar 30, 2020

Cases where we want to automatically split into two y-axis:

  • Two different metrics on different scales
    • [Detected when visualization is created and stored forever], or
    • detected on every render, if no explicit axis was set, if it should be on the same or separate axes. We would have a 3-state: Auto, Left, Right. By default all axes is being set to "auto", which means we're detecting automatically in the lens_xy_visualization function where it belongs. We want to go with that, instead of the first option for now, since it significantly easier in our current infrastructure.
  • Metrics are using different formatters

What do we do, if our system is figuring out, that we would need more then 2 axis to put all series? We will go beyond 2 axis in the auto mode if they should be separate. There should be a separate discussion of a proper "hinting and tips" system that will guide users that this might be a bad idea to do.

We also need a way for visualizations to extend the popover panel (that is currently provided by the datasource).

@cchaos
Copy link
Contributor

cchaos commented Apr 1, 2020

I'm just going to put a link to this article that offers alternatives to multiple y-axis. I only mention it because Lens is supposed to be geared towards making the "right" chart choice. I'm not necessarily saying no to multiple y-axis, but just to consider if there are also other ways we can support the data needs.

https://blog.datawrapper.de/dualaxis/

@flash1293
Copy link
Contributor

Discussed with @wylieconlon and we can go forward with the approach outlined in the comment above #53663 (comment)

The prerequisite of popover panel extensions for visualizations is already available.

@flash1293 flash1293 changed the title Support two y-axis for visualizing data in different scale [Lens] Support two y-axis for visualizing data in different scale Jun 5, 2020
@flash1293 flash1293 self-assigned this Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants