Skip to content

feat: compute global y domain on multiple groups#348

Merged
markov00 merged 2 commits intoelastic:masterfrom
markov00:feat-reuse-default-groupdomain
Aug 26, 2019
Merged

feat: compute global y domain on multiple groups#348
markov00 merged 2 commits intoelastic:masterfrom
markov00:feat-reuse-default-groupdomain

Conversation

@markov00
Copy link
Copy Markdown
Collaborator

Summary

fix #169, fix #185

This feature allows to compute the global Y domain on multiple groups ids.
It collect all the groupIds Y domains and extend them to the max extent.

This provide an easier way to add multiple groups but keep the same domain without need of external domain computation etc.

Screenshot 2019-08-26 at 02 44 45

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

  • Any consumer-facing exports were added to src/index.ts (and stories only import from ../src except for test data & storybook)
  • [ ] This was checked for cross-browser compatibility, including a check against IE11
  • 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

This commit add a new property for the series: useDefaultGroupDomain that allows to split series by
groupId but keeps and compute the new groupId domain merging it with the global one

fix elastic#169
@markov00 markov00 added enhancement New feature or request :specs Chart specifications related issue labels Aug 26, 2019
@markov00 markov00 requested a review from nickofthyme August 26, 2019 00:53
@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 26, 2019

Codecov Report

Merging #348 into master will decrease coverage by 0.03%.
The diff coverage is 95.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #348      +/-   ##
==========================================
- Coverage   98.45%   98.41%   -0.04%     
==========================================
  Files          38       38              
  Lines        2710     2769      +59     
  Branches      644      670      +26     
==========================================
+ Hits         2668     2725      +57     
- Misses         39       41       +2     
  Partials        3        3
Impacted Files Coverage Δ
src/chart_types/xy_chart/utils/specs.ts 100% <100%> (ø) ⬆️
src/chart_types/xy_chart/domains/y_domain.ts 97.02% <95.45%> (-2.98%) ⬇️
src/utils/themes/theme.ts 100% <0%> (ø) ⬆️
src/utils/commons.ts 95.45% <0%> (+1.01%) ⬆️
src/specs/settings.tsx 96.61% <0%> (+2.49%) ⬆️

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 0247b4a...603d1ee. Read the comment docs.

Copy link
Copy Markdown
Collaborator

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

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

Wow, this is amazing! Well done. All stacked functionality in storybook looks unaffected 🎉

return mergeYDomainForGroup(dataSeries, groupId, groupSpecs, customDomain);
});

const globalGroupIds: Set<GroupId> = specs.reduce<Set<GroupId>>((acc, { groupId, useDefaultGroupDomain }) => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@markov00 markov00 merged commit 5ab46ca into elastic:master Aug 26, 2019
@markov00 markov00 deleted the feat-reuse-default-groupdomain branch August 26, 2019 14:59
markov00 pushed a commit that referenced this pull request Aug 26, 2019
# [10.3.0](v10.2.0...v10.3.0) (2019-08-26)

### Features

* compute global y domain on multiple groups ([#348](#348)) ([5ab46ca](5ab46ca)), closes [#169](#169) [#185](#185)
@markov00
Copy link
Copy Markdown
Collaborator Author

🎉 This PR is included in version 10.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Aug 26, 2019
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

enhancement New feature or request released Issue released publicly :specs Chart specifications related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'tickFormat' property should affect only Axis for which it be declared Stacked within series

3 participants