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

fix(bullet): full circle overlapping tick labels #2350

Merged
merged 4 commits into from
Mar 12, 2024

Conversation

nickofthyme
Copy link
Collaborator

@nickofthyme nickofthyme commented Mar 8, 2024

Summary

Simple fix for overlapping ticks on Circle Bullet chart. Also now allows passing ticks as number[] instead of (domain: [number, number]) => number[].

Zight Recording 2024-03-08 at 08 52 31 AM

Details

This is a basic fix to remove the ending tick on the circular bullet whenever the start and end tick values are the same. This is to prevent overlapping.

This is not a perfect fix as it does not address the issue for when the label position are not equal but still overlap due to the length of the labels.

Checklist

  • The proper chart type label has been added (e.g. :xy, :partition)
  • All related issues have been linked (i.e. closes #123, fixes #123)
  • New public API exports have been added to packages/charts/src/index.ts
  • Unit tests have been added or updated to match the most common scenarios

@nickofthyme nickofthyme added the :bullet Bullet chart related issues label Mar 8, 2024
@nickofthyme nickofthyme requested a review from markov00 March 8, 2024 15:55
@nickofthyme
Copy link
Collaborator Author

buildkite update screenshots

@nickofthyme
Copy link
Collaborator Author

@markov00 could you take a look and this quick PR. As a first pass I am just adopting the approach from kibana to remove the max value of the 2 overlapping ticks.

Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I'm fine with that fix even if this partially cover the problem

@nickofthyme nickofthyme merged commit edbff68 into elastic:main Mar 12, 2024
13 checks passed
@nickofthyme nickofthyme deleted the fix-circle-ticks branch March 12, 2024 15:29
nickofthyme pushed a commit that referenced this pull request Mar 12, 2024
## [64.0.2](v64.0.1...v64.0.2) (2024-03-12)

### Bug Fixes

* **bullet:** full circle overlapping tick labels ([#2350](#2350)) ([edbff68](edbff68))
* **deps:** update dependency @elastic/eui to ^93.3.0 ([#2356](#2356)) ([cf9ce81](cf9ce81))
* **deps:** update dependency @playwright/test to ^1.42.1 ([#2354](#2354)) ([03581bc](03581bc))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:bullet Bullet chart related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants