-
Notifications
You must be signed in to change notification settings - Fork 122
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
feat(goal): auto generated linear ticks #1637
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nickofthyme
added
enhancement
New feature or request
:goal/gauge (old)
Old Goal/Gauge chart related issues
labels
Mar 31, 2022
markov00
requested changes
Mar 31, 2022
packages/charts/src/chart_types/goal_chart/layout/viewmodel/viewmodel.ts
Outdated
Show resolved
Hide resolved
packages/charts/src/chart_types/goal_chart/layout/viewmodel/viewmodel.ts
Outdated
Show resolved
Hide resolved
packages/charts/src/chart_types/goal_chart/layout/viewmodel/viewmodel.ts
Outdated
Show resolved
Hide resolved
packages/charts/src/chart_types/goal_chart/layout/viewmodel/viewmodel.ts
Outdated
Show resolved
Hide resolved
packages/charts/src/chart_types/goal_chart/layout/viewmodel/viewmodel.ts
Outdated
Show resolved
Hide resolved
markov00
reviewed
Apr 5, 2022
Co-authored-by: Marco Vettorello <[email protected]>
markov00
approved these changes
Apr 6, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good now, thanks for all the updates.
I've put some minor comments about the docs/tsdocs, everything else is great!
nickofthyme
added a commit
to nickofthyme/elastic-charts
that referenced
this pull request
Apr 7, 2022
BREAKING CHANGE: goal chart now requires domain min and max to be defined
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
breaking change
enhancement
New feature or request
:goal/gauge (old)
Old Goal/Gauge chart related issues
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds automated linear ticks for goal/gauge charts when to
ticks
value is provided. Adds a newnice
prop to force ticks to be niced given the specified domain. The autogenerated ticks are independent of the values provided forbands
.BREAKING CHANGE: goal chart now requires domain min and max to be defined
Before
When no
ticks
prop is provided we just default to this...After
Now whenever
ticks
prop is not defined when compute the sensible linear ticks.Details
This PR adds linear ticks generation from the provided domain via a
ScaleContinuous
.See demo story here
Issues
closes #1238
Checklist
:xy
,:partition
)closes #123
,fixes #123
)packages/charts/src/index.ts