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

Add option to hide labels when they protrude the respective bar #1234

Closed
Tracked by #1123
markov00 opened this issue Jul 8, 2021 · 1 comment · Fixed by #1233
Closed
Tracked by #1123

Add option to hide labels when they protrude the respective bar #1234

markov00 opened this issue Jul 8, 2021 · 1 comment · Fixed by #1233
Labels
:annotation Annotation (line, rect, text) related issue released Issue released publicly :xy Bar/Line/Area chart related

Comments

@markov00
Copy link
Member

markov00 commented Jul 8, 2021

The current option hideClippedValue only hides labels that flow outside the projection area.
As requested by #1123, we should also add the ability to hide labels that cannot be rendered fully within the bar geometry.

@markov00 markov00 changed the title text is rendered in some cases although they don't fit on their segment Add option to hide labels when they protrude the respective bar Jul 8, 2021
@markov00 markov00 added :annotation Annotation (line, rect, text) related issue :xy Bar/Line/Area chart related labels Jul 8, 2021
markov00 added a commit that referenced this issue Jul 14, 2021
The overflowConstraints prop now replaces the existing BarSeries.displayValueSettings.hideClippedValue prop extending the existing feature with the ability to hide labels that protrude the bar geometry.

fix #1234

BREAKING CHANGE: an API change is introduced: `hideClippedValue` is removed in favor of `overflowConstraints?: Array<LabelOverflowConstraint>;`. The array can contain one or multiple overflow constraints enumerated as `LabelOverflowConstraint`
nickofthyme pushed a commit that referenced this issue Jul 14, 2021
# [33.0.0](v32.0.0...v33.0.0) (2021-07-14)

### Features

* **xy:** add null bars to geometry indexing ([#1226](#1226)) ([20b81a9](20b81a9)), closes [#950](#950)
* **xy:** hide labels that protrude the bar geometry ([#1233](#1233)) ([be1fb3d](be1fb3d)), closes [#1234](#1234)

### BREAKING CHANGES

* **xy:** an API change is introduced: `hideClippedValue` is removed in favor of `overflowConstraints?: Array<LabelOverflowConstraint>;`. The array can contain one or multiple overflow constraints enumerated as `LabelOverflowConstraint`
@nickofthyme
Copy link
Collaborator

🎉 This issue has been resolved in version 33.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nickofthyme nickofthyme added the released Issue released publicly label Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:annotation Annotation (line, rect, text) related issue released Issue released publicly :xy Bar/Line/Area chart related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants