-
Notifications
You must be signed in to change notification settings - Fork 120
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(partition): order slices and sectors #1112
Conversation
jenkins please test this |
Codecov Report
@@ Coverage Diff @@
## master #1112 +/- ##
==========================================
+ Coverage 72.03% 72.47% +0.44%
==========================================
Files 381 397 +16
Lines 11919 12244 +325
Branches 2601 2651 +50
==========================================
+ Hits 8586 8874 +288
- Misses 3308 3337 +29
- Partials 25 33 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@monfera it seems fine to me. What I want is:
@flash1293 I think it is fine for Lens too. wdyt? |
@stratoula correct, and if you need special sorting, eg. you want to put the "Other" slice to the end, even if it's not the smallest slice, then you can rely on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally with configurations of specialFirstInnermostSector
, clockwiseSectors
and legend. Works as expected
Didn't test the code, but the API looks good to me - a function will give full flexibility which can be use to look up the row index the data table for "user defined" sorting |
Thanks @markov00 for the review and for @stratoula and @flash1293 for looking at the API. I ended up merging relatively fast as this doesn't lock us in anyway, if there's post-merge or integration time feedback to act upon, and it clears the baseline for the upcoming partition related PRs (lower risk of merge conflict) |
# [28.1.0](v28.0.1...v28.1.0) (2021-04-13) ### Bug Fixes * **legend:** sizing for short labels with scrollbar ([#1115](#1115)) ([6e1f223](6e1f223)) * **xy:** negative bar highlight and click ([#1109](#1109)) ([ec17cb2](ec17cb2)), closes [#1100](#1100) ### Features * **a11y:** improve chart figure ([#1104](#1104)) ([815cf39](815cf39)) * **partition:** order slices and sectors ([#1112](#1112)) ([74df29b](74df29b)) * **partitions:** small multipies events pass on smAccessorValue ([#1106](#1106)) ([a3234fe](a3234fe)) * **xy:** optionally rounds the domain to nice values ([#1087](#1087)) ([f644cc4](f644cc4)) * **xy:** specify pixel and ratio width for bars ([#1114](#1114)) ([58de413](58de413)) * mosaic ([#1113](#1113)) ([64bdd88](64bdd88))
🎉 This PR is included in version 28.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [28.1.0](elastic/elastic-charts@v28.0.1...v28.1.0) (2021-04-13) ### Bug Fixes * **legend:** sizing for short labels with scrollbar ([opensearch-project#1115](elastic/elastic-charts#1115)) ([ebf2552](elastic/elastic-charts@ebf2552)) * **xy:** negative bar highlight and click ([opensearch-project#1109](elastic/elastic-charts#1109)) ([065673c](elastic/elastic-charts@065673c)), closes [opensearch-project#1100](elastic/elastic-charts#1100) ### Features * **a11y:** improve chart figure ([opensearch-project#1104](elastic/elastic-charts#1104)) ([373ea72](elastic/elastic-charts@373ea72)) * **partition:** order slices and sectors ([opensearch-project#1112](elastic/elastic-charts#1112)) ([72c0d1b](elastic/elastic-charts@72c0d1b)) * **partitions:** small multipies events pass on smAccessorValue ([opensearch-project#1106](elastic/elastic-charts#1106)) ([0e1f7de](elastic/elastic-charts@0e1f7de)) * **xy:** optionally rounds the domain to nice values ([opensearch-project#1087](elastic/elastic-charts#1087)) ([9c2eefc](elastic/elastic-charts@9c2eefc)) * **xy:** specify pixel and ratio width for bars ([opensearch-project#1114](elastic/elastic-charts#1114)) ([6294d5f](elastic/elastic-charts@6294d5f)) * mosaic ([opensearch-project#1113](elastic/elastic-charts#1113)) ([15c0d78](elastic/elastic-charts@15c0d78))
Summary
Adds slice sorting for the use of pie charts and sunburst, which allows
Precondition for mosaic plot #1113
Closes #1012
Contributes toward elastic/kibana#90179
Partially addresses #381
The newly introduced
sortPredicate
is for a sort predicate that compares order of any given twoArrayEntry
objects.ArrayEntry
has already been part of the public API, so we don't need to publish a new data type for this.Checklist
Delete any items that are not applicable to this PR.
src/index.ts
(and stories only import from../src
except for test data & storybook)