-
Notifications
You must be signed in to change notification settings - Fork 121
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: nice ticks everywhere #1087
Merged
markov00
merged 18 commits into
elastic:master
from
markov00:2021_03_23-nice_ticks_everywhere
Apr 13, 2021
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
fe47338
feat: nice ticks everywhere
markov00 acee82b
feat: add nice prop on scale type
markov00 521a15f
refactor: compute scale API config separately
markov00 5aa72fc
test: fix wrong test change
markov00 6ec6b3e
fix: reduce global scale correctly
markov00 5d2f1a8
fix: stories
markov00 c063d22
Merge branch 'master' into 2021_03_23-nice_ticks_everywhere
markov00 08527a0
chore: fix lint and api docs
markov00 5120ef8
Merge branch 'master' into 2021_03_23-nice_ticks_everywhere
markov00 b9db40c
fix: review comments
markov00 38ca96f
Merge branch '2021_03_23-nice_ticks_everywhere' of github.com:markov0…
markov00 e0416b5
Merge branch 'master' into 2021_03_23-nice_ticks_everywhere
markov00 cedf1bb
refactor: rename internal ticks in desiredTickCount
markov00 c0060d0
refactor: split type and nice into separate props
markov00 f0a9090
Merge branch '2021_03_23-nice_ticks_everywhere' of github.com:markov0…
markov00 7062f47
Merge branch 'master' into 2021_03_23-nice_ticks_everywhere
markov00 2d16951
test: update VRT with negative values
markov00 df26747
Merge branch 'master' into 2021_03_23-nice_ticks_everywhere
markov00 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: fix lint and api docs
- Loading branch information
commit 08527a0e9741ec2d665c5cbe039d9e8afe160398
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,14 @@ export const AnnotationType: Readonly<{ | |
// @public (undocumented) | ||
export type AnnotationType = $Values<typeof AnnotationType>; | ||
|
||
// @public (undocumented) | ||
export interface APIScale<T extends ScaleType> { | ||
// (undocumented) | ||
nice: boolean; | ||
// (undocumented) | ||
type: T; | ||
} | ||
monfera marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
// @public (undocumented) | ||
export interface ArcSeriesStyle { | ||
// (undocumented) | ||
|
@@ -1670,10 +1678,10 @@ export type SeriesNameFn = (series: XYChartSeriesIdentifier, isTooltip: boolean) | |
// @public (undocumented) | ||
export interface SeriesScales { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unrelated to the PR:
|
||
timeZone?: string; | ||
xScaleType: XScaleType; | ||
xScaleType: XScaleType | APIScale<XScaleType>; | ||
// @deprecated | ||
yScaleToDataExtent?: boolean; | ||
yScaleType: ScaleContinuousType; | ||
yScaleType: ScaleContinuousType | APIScale<ScaleContinuousType>; | ||
} | ||
|
||
// @public (undocumented) | ||
|
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
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
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
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
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
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
18 changes: 0 additions & 18 deletions
18
src/chart_types/xy_chart/state/selectors/get_data_domain.ts
This file was deleted.
Oops, something went wrong.
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
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.
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.
Not sure of the pros/cons of putting the word
API
in an element of the API, all things being equal, would prefer a simple, expressive, semantic name. I'd probably not call itScale
because it's currently just a tuple of{type: 'linear' | ..., nice: boolean}
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.
Right, any suggestion? what if we don't expose the interface externally on our API, and we reserve the
APIScale
type for internal purposes?The external will look like this:
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.
I think, even for internal use the word "API" in it is a good question, maybe it has a bunch of benefits, eg. knowing which "boundary layer" we talk about, eg. external API, internal API or implementation detail (the latter of which is clear from
@internal
).Could namespaces / modules achieve this without resorting to Hungarian notation?
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.
Is this inception or recursion?
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.