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.
|
markov00
left a comment
There was a problem hiding this comment.
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.
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.
Please, also add the return type
There was a problem hiding this comment.
Thanks Marco, will do, the upcoming PR deals with and extracts out this function
nickofthyme
left a comment
There was a problem hiding this comment.
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../srcexcept for test data & storybook)