feat(goal): auto generated linear ticks#1637
Merged
nickofthyme merged 16 commits intoelastic:masterfrom Apr 6, 2022
Merged
Conversation
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 <vettorello.marco@gmail.com>
markov00
approved these changes
Apr 6, 2022
Collaborator
markov00
left a comment
There was a problem hiding this comment.
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
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
ticksvalue is provided. Adds a newniceprop 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
ticksprop is provided we just default to this...After
Now whenever
ticksprop 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