-
Notifications
You must be signed in to change notification settings - Fork 121
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): linked text overflow avoidance #670
feat(partition): linked text overflow avoidance #670
Conversation
Removed the The unit testing plan for a subsequent PR is the following:
|
Codecov Report
@@ Coverage Diff @@
## master #670 +/- ##
==========================================
- Coverage 72.97% 72.60% -0.38%
==========================================
Files 266 266
Lines 8634 8678 +44
Branches 1698 1710 +12
==========================================
Hits 6301 6301
- Misses 2294 2338 +44
Partials 39 39
Continue to review full report at Codecov.
|
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.
LGTM, I've added a comment to include the TSDoc for the monotonicMaximizer
function as it's a little bit difficult to understand looking just at the function signature.
.filter((l: LinkLabelVM) => l.text !== ''); // cull linked labels whose text was truncated to nothing | ||
} | ||
|
||
function monotonicMaximizer( |
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.
nit: Could you please add a jsdoc describing what this function does?
It's a little cryptic and I've difficulties understanding what is going on there
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.
Please, also add the return type
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.
Thanks Marco, will do, the upcoming PR deals with and extracts out this function
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.
Code and functionality all LGTM
Codecov Report
@@ Coverage Diff @@
## master #670 +/- ##
==========================================
- Coverage 72.97% 72.60% -0.38%
==========================================
Files 266 266
Lines 8634 8678 +44
Branches 1698 1710 +12
==========================================
Hits 6301 6301
- Misses 2294 2338 +44
Partials 39 39
Continue to review full report at Codecov.
|
# [19.4.0](v19.3.0...v19.4.0) (2020-05-28) ### Bug Fixes * **partition:** consider legendMaxDepth on legend size ([#654](#654)) ([9429dcf](9429dcf)), closes [#639](#639) ### Features * **partition:** enable grooves in all group layers ([#666](#666)) ([f5b4767](f5b4767)) * **partition:** linked text overflow avoidance ([#670](#670)) ([b6e5911](b6e5911)), closes [#633](#633) * **partition:** monotonic font size scaling ([#681](#681)) ([ea2489b](ea2489b)), closes [#661](#661) * **tooltip:** improve positioning with popperjs ([#651](#651)) ([6512950](6512950)), closes [#596](#596)
🎉 This PR is included in version 19.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [19.4.0](elastic/elastic-charts@v19.3.0...v19.4.0) (2020-05-28) ### Bug Fixes * **partition:** consider legendMaxDepth on legend size ([opensearch-project#654](elastic/elastic-charts#654)) ([20cc6ec](elastic/elastic-charts@20cc6ec)), closes [opensearch-project#639](elastic/elastic-charts#639) ### Features * **partition:** enable grooves in all group layers ([opensearch-project#666](elastic/elastic-charts#666)) ([b1bdfb3](elastic/elastic-charts@b1bdfb3)) * **partition:** linked text overflow avoidance ([opensearch-project#670](elastic/elastic-charts#670)) ([59617db](elastic/elastic-charts@59617db)), closes [opensearch-project#633](elastic/elastic-charts#633) * **partition:** monotonic font size scaling ([opensearch-project#681](elastic/elastic-charts#681)) ([d46767c](elastic/elastic-charts@d46767c)), closes [opensearch-project#661](elastic/elastic-charts#661) * **tooltip:** improve positioning with popperjs ([opensearch-project#651](elastic/elastic-charts#651)) ([61d1d9a](elastic/elastic-charts@61d1d9a)), closes [opensearch-project#596](elastic/elastic-charts#596)
Summary
Truncates linked label text to fit in the chart box (WIP)
Example with off-center pie chart to avoid centered special case:
It culls a link label altogether if
Food...
slice:Closes #633
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)