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

Fitted domain should apply to stacked domains #1050

Closed
2 tasks done
nickofthyme opened this issue Mar 3, 2021 · 4 comments
Closed
2 tasks done

Fitted domain should apply to stacked domains #1050

nickofthyme opened this issue Mar 3, 2021 · 4 comments
Assignees
Labels
bug Something isn't working :data Data/series/scales related issue wontfix This will not be worked on

Comments

@nickofthyme
Copy link
Collaborator

Describe the bug
When using a stacked series and setting the y-axis domain.fit to true, the domain is still locked to 0.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/cool-tree-42qto?file=/src/App.tsx
  2. Comment on and off the stackedAccessors line
  3. Notice the stacked series forces the baseline to be 0, and the non-stacked series accurately fits the data to the dataset

Expected behaviour
Stacked data should be fittable

Screenshots

Screen.Recording.2021-03-03.at.04.41.46.PM.mp4

Version (please complete the following information):

  • Elastic Charts: master

Kibana Cross Issues
elastic/kibana#93352

Checklist

  • every related Kibana issue is listed under Kibana Cross Issues list
  • kibana cross issue tag is associated to the issue if any kibana cross issue is present
@nickofthyme nickofthyme added bug Something isn't working :data Data/series/scales related issue labels Mar 3, 2021
@nickofthyme nickofthyme self-assigned this Mar 3, 2021
@markov00
Copy link
Member

markov00 commented Mar 5, 2021

I see this from a different point of view. We should allow fitting the data only for line series, nothing else.
This because: bar and area should always start at 0 baseline, no exception. Their height/area represents their value, and we should prevent truncations.

@nickofthyme
Copy link
Collaborator Author

@markov00 Ok I agree with the exception of log scales. So line can be fitted for all cases and area or bar can be fitted when the scale is set to log. What do you think?

@markov00
Copy link
Member

markov00 commented Apr 6, 2021

Removing the zero baseline for line series is fine in all cases.
Removing the zero baseline for area and ba is always wrong. The exception we are applying to log is more an exception to improve the rendering and reading of the chart for a particular data domain. We only know that there can be a zero when we use a log scale, so we are limiting the rendering to a similar, but very small, zero-like baseline. Applying domain fit to area or bar is not a good approach IMHO

@nickofthyme
Copy link
Collaborator Author

Won't fix per discussion with team over zoom. Main takeaways from the discussion:

  • Area charts should always have a zero baseline
  • Stacked log area charts don't make sense
  • We should disallow log scales for area and bar charts

@nickofthyme nickofthyme added the wontfix This will not be worked on label Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working :data Data/series/scales related issue wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants