Skip to content

fix(axis): ticks generation for linear scale on bar charts#1645

Merged
markov00 merged 7 commits intoelastic:masterfrom
markov00:2022_04_12-fix_linear_ticks
Apr 14, 2022
Merged

fix(axis): ticks generation for linear scale on bar charts#1645
markov00 merged 7 commits intoelastic:masterfrom
markov00:2022_04_12-fix_linear_ticks

Conversation

@markov00
Copy link
Copy Markdown
Collaborator

@markov00 markov00 commented Apr 12, 2022

Summary

We introduced a logic into tick generation to avoid generating denser ticks when rendering bar charts. It also reduce the number of ticks generated in this case, rendering only a set of ticks at nicer rounded intervals.

See screenshot changes for a comparison of what has changed.

Replace #1435

Details

I have introduced a tick rarefication logic in the continuous scale that works only for bar charts. Nothing has changed for line/area as suggested by @monfera #1435 (comment)

TO REVIEWERS: do you consider this as a breaking change?

Checklist

  • The proper chart type label has been added (e.g. :xy, :partition)
  • The proper feature labels have been added (e.g. :interactions, :axis)
  • All related issues have been linked (i.e. closes #123, fixes #123)
  • Unit tests have been added or updated to match the most common scenarios
  • The proper documentation and/or storybook story has been added or updated

@markov00 markov00 changed the title fix(axis): nice ticks for linear scale with bar charts fix(axis): ticks generation for linear scale on bar charts Apr 12, 2022
@markov00 markov00 added enhancement New feature or request :axis Axis related issue :xy Bar/Line/Area chart related labels Apr 12, 2022
@markov00 markov00 requested review from monfera and nickofthyme April 12, 2022 12:52
@markov00 markov00 marked this pull request as ready for review April 12, 2022 13:04
@markov00 markov00 merged commit 65d0e7d into elastic:master Apr 14, 2022
@markov00 markov00 deleted the 2022_04_12-fix_linear_ticks branch April 14, 2022 10:43
nickofthyme pushed a commit that referenced this pull request Apr 14, 2022
# [46.0.0](v45.1.1...v46.0.0) (2022-04-14)

### Bug Fixes

* **axis:** ticks generation for linear scale on bar charts ([#1645](#1645)) ([65d0e7d](65d0e7d))
* **axis:** use correct desired tick count based on axis type ([#1646](#1646)) ([512a6cd](512a6cd))
* **deps:** update dependency @elastic/eui to v53 ([#1639](#1639)) ([34bf325](34bf325))
* **deps:** update dependency @elastic/eui to v54 ([#1642](#1642)) ([6eaca0a](6eaca0a))

### Features

* **axes:** option to fit domain to list of annotation `SpecIds` ([#1641](#1641)) ([220350d](220350d))
* **goal:** auto generated linear ticks ([#1637](#1637)) ([5437d8e](5437d8e))
* **legend:** expose sorting function ([#1644](#1644)) ([128114c](128114c))

### BREAKING CHANGES

* **goal:** goal chart now requires domain min and max to be defined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:axis Axis related issue enhancement New feature or request :xy Bar/Line/Area chart related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants