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

feat: add domain fitting #510

Merged
merged 4 commits into from Jan 8, 2020

Conversation

nickofthyme
Copy link
Collaborator

@nickofthyme nickofthyme commented Jan 8, 2020

Summary

  • Upgrade prettier dependencies to fix errors with optional chaining. Release 1.19 checklist prettier/prettier#6469
  • Add fit option to Axis.domain option. This will fit the domain to the given data. if the min or max is near but not over 0 it will use 0 as the baseline.
  • Adds a 1/12 range gap of the entire domain.

Related to https://github.com/elastic/sdh-kibana/issues/176
Fixes elastic/kibana#53257

Positive

Before

image

After

image

Positive & Negative

Before

image

After

image

Negative

Before

image

After

image

Checklist

  • Proper documentation or storybook story was added for features that require explanation or tutorials
  • Unit tests were updated or added to match the most common scenarios
  • Each commit follows the convention

@nickofthyme nickofthyme added the :axis Axis related issue label Jan 8, 2020
@codecov-io
Copy link

codecov-io commented Jan 8, 2020

Codecov Report

Merging #510 into master will decrease coverage by 0.04%.
The diff coverage is 93.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #510      +/-   ##
==========================================
- Coverage   84.59%   84.54%   -0.05%     
==========================================
  Files         158      169      +11     
  Lines        4738     4912     +174     
  Branches      967      959       -8     
==========================================
+ Hits         4008     4153     +145     
- Misses        715      743      +28     
- Partials       15       16       +1
Impacted Files Coverage Δ
src/utils/commons.ts 100% <ø> (ø) ⬆️
..._types/xy_chart/state/selectors/get_cursor_band.ts 90.32% <ø> (ø) ⬆️
src/chart_types/xy_chart/utils/specs.ts 100% <ø> (ø) ⬆️
src/utils/data_generators/data_generator.ts 78.94% <0%> (-21.06%) ⬇️
...chart/state/selectors/is_histogram_mode_enabled.ts 100% <100%> (ø) ⬆️
...types/xy_chart/state/selectors/get_tooltip_type.ts 76.92% <100%> (ø) ⬆️
src/chart_types/xy_chart/rendering/rendering.ts 96.92% <100%> (ø) ⬆️
src/components/legend/legend.tsx 88.57% <100%> (ø) ⬆️
src/components/chart_container.tsx 55.73% <100%> (ø) ⬆️
..._types/xy_chart/renderer/canvas/reactive_chart.tsx 50.45% <100%> (ø) ⬆️
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc866d6...5c5c761. Read the comment docs.

@nickofthyme nickofthyme changed the title Fix/add domain fitting feat: add domain fitting Jan 8, 2020
Copy link
Contributor

@rshen91 rshen91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look great to me! I appreciate the clearness in the domain tests and the new axis story you have written- 'fit domain to extent in y axis' both changes make it very clear what this PR is accomplishing. Also, thanks for the help with the prettier updates, once I quit my VSCode and brought it back, the new prettier didn't cause any problems. So all those prettier changes look great too!

@nickofthyme nickofthyme merged commit fefe728 into elastic:master Jan 8, 2020
@nickofthyme nickofthyme deleted the fix/add-domain-fitting branch January 8, 2020 15:52
markov00 pushed a commit that referenced this pull request Jan 8, 2020
# [16.1.0](v16.0.2...v16.1.0) (2020-01-08)

### Features

* add domain fitting ([#510](#510)) ([fefe728](fefe728))
@markov00
Copy link
Member

markov00 commented Jan 8, 2020

🎉 This PR is included in version 16.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Jan 8, 2020
nickofthyme added a commit to nickofthyme/elastic-charts that referenced this pull request Jan 9, 2020
* Add option to fit y domain to data
nickofthyme added a commit that referenced this pull request Jan 10, 2020
* feat: add domain fitting (#510)

* Add option to fit y domain to data

* Remove story cuz vr tests are failing to run

* fix bad type
markov00 pushed a commit that referenced this pull request Jan 10, 2020
## [13.5.13](v13.5.12...v13.5.13) (2020-01-10)

### Bug Fixes

* add domain fitting for tsvb regression ([#511](#511)) ([bcd08b7](bcd08b7)), closes [#510](#510)
@markov00 markov00 mentioned this pull request May 7, 2020
27 tasks
@nickofthyme nickofthyme mentioned this pull request Jun 12, 2020
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:axis Axis related issue released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TSVB Yaxis min value defaults to zero - Data binding not working with filter
4 participants