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

Value labels could have a font size as a ratio of the bar width #788

Closed
wylieconlon opened this issue Aug 20, 2020 · 1 comment · Fixed by #789
Closed

Value labels could have a font size as a ratio of the bar width #788

wylieconlon opened this issue Aug 20, 2020 · 1 comment · Fixed by #789
Labels
enhancement New feature or request :Lens Kibana Lens related issue released Issue released publicly :xy Bar/Line/Area chart related

Comments

@wylieconlon
Copy link

One of the issues we have run into with the Lens value labeling work is that the font sizes are hard to set correctly for a chart we don't know the width of. I think the chart library should be able to use the geometry of the bars to determine a good font size, instead of the font size being set externally.

@wylieconlon wylieconlon added the :xy Bar/Line/Area chart related label Aug 20, 2020
@markov00 markov00 added the enhancement New feature or request label Aug 26, 2020
@wylieconlon wylieconlon added the :Lens Kibana Lens related issue label Aug 27, 2020
dej611 added a commit to wylieconlon/elastic-charts that referenced this issue Sep 22, 2020
Introduce a range size format for bar chart labels to auto scale and improve readability

Address elastic#788
dej611 pushed a commit that referenced this issue Oct 14, 2020
Bar charts value labels are automatically scaled up to best fit the bar area and improve readability. The auto scaling can be limited to upper and lower bounds if required.
The scaling takes into account chart rotation and box hiding computation has been reworked to adapt to the new mechanism.

fix: #788

BREAKING CHANGE: The `DisplayValueStyle` `fontSize` property can now express an upper and lower bound as size, used for the automatic scaling.
markov00 pushed a commit that referenced this issue Oct 19, 2020
# [24.0.0](v23.2.1...v24.0.0) (2020-10-19)

### Bug Fixes

* **annotation:** annotation rendering with no yDomain or groupId ([#842](#842)) ([f173b49](f173b49)), closes [#438](#438) [#798](#798)

### Features

* **bar_chart:** add Alignment offset to value labels ([#784](#784)) ([363aeb4](363aeb4))
* **bar_chart:** add shadow prop for value labels ([#785](#785)) ([9b29392](9b29392))
* **bar_chart:** scaled font size for value labels ([#789](#789)) ([3bdd1ee](3bdd1ee)), closes [#788](#788)
* **heatmap:** allow fixed right margin ([#873](#873)) ([16cf73c](16cf73c))

### BREAKING CHANGES

* **bar_chart:** The `DisplayValueStyle` `fontSize` property can now express an upper and lower bound as size, used for the automatic scaling.
* **bar_chart:** The `DisplayValueStyle` `fill` property can now express a border color and width, or let the library pick the best match based on contrast using the textInvertible parameter.
@markov00
Copy link
Member

🎉 This issue has been resolved in version 24.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Oct 19, 2020
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
# [24.0.0](elastic/elastic-charts@v23.2.1...v24.0.0) (2020-10-19)

### Bug Fixes

* **annotation:** annotation rendering with no yDomain or groupId ([opensearch-project#842](elastic/elastic-charts#842)) ([6bad0d7](elastic/elastic-charts@6bad0d7)), closes [opensearch-project#438](elastic/elastic-charts#438) [opensearch-project#798](elastic/elastic-charts#798)

### Features

* **bar_chart:** add Alignment offset to value labels ([opensearch-project#784](elastic/elastic-charts#784)) ([106d924](elastic/elastic-charts@106d924))
* **bar_chart:** add shadow prop for value labels ([opensearch-project#785](elastic/elastic-charts#785)) ([de95b44](elastic/elastic-charts@de95b44))
* **bar_chart:** scaled font size for value labels ([opensearch-project#789](elastic/elastic-charts#789)) ([8b74a9d](elastic/elastic-charts@8b74a9d)), closes [opensearch-project#788](elastic/elastic-charts#788)
* **heatmap:** allow fixed right margin ([opensearch-project#873](elastic/elastic-charts#873)) ([dd34574](elastic/elastic-charts@dd34574))

### BREAKING CHANGES

* **bar_chart:** The `DisplayValueStyle` `fontSize` property can now express an upper and lower bound as size, used for the automatic scaling.
* **bar_chart:** The `DisplayValueStyle` `fill` property can now express a border color and width, or let the library pick the best match based on contrast using the textInvertible parameter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request :Lens Kibana Lens 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