-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Mult axis formatting #6334
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
Mult axis formatting #6334
Changes from all commits
e4a81e3
de79261
18f21cb
0e85776
ba0c587
2731eb8
c535c56
a8fcadc
0f93feb
d79ef96
b1d10c5
3fa0f0c
50fe1fd
1984b7e
b9c77b8
8a420d6
8d0c9eb
5528a35
fbdc5a4
d742cc5
c2ba6b0
cb66b12
38f17b2
bbf682f
0175979
7a1c9d8
5aee58b
fd098a9
79c2c74
bc9bfa2
5ffbdd2
168b3db
472efb9
0c33429
83e7f82
6e71f53
28eadb0
6d5ecb5
2b951fd
f97f27c
de4dd05
38d3e71
683d0f3
eca5d4f
b84f89d
5f2240f
81b661f
ec1f855
e56020d
b8bfab5
b41678c
6064e5a
085c2b7
49ddf46
a45eca6
56605bc
5506ed4
61c2889
d06bc6d
bab8020
09b5d0c
b89f59a
948809b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1003,6 +1003,30 @@ module.exports = { | |
'Only has an effect if `anchor` is set to *free*.' | ||
].join(' ') | ||
}, | ||
autoshift: { | ||
valType: 'boolean', | ||
dflt: false, | ||
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. What happens / should happen if one sets 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.
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. Numbers and 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. If the default off is "false", would it be clearer for the 'on' to be "true"? But happy to switch to "auto" if that's better aligned with the existing standard. 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. Right, the idea would be to not allow Numbers plus On the other hand, in all those cases That's a bit annoying, though I suspect unless we do that there's a subtle bug with the above number-with-default-auto cases: if you set a non-auto value in a template you won't be able to get back to auto later. Or even just if you've set a value in your figure and you want to unset it later, or explicitly affirm the value I do like the idea of
@hannahker @archmoj thoughts? We do need to update 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. I think we should possibly make this attribute an object then provide various current/future options inside it e.g. shift: {
enabled: boolean,
value: number
} 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. @alexcjohnson @archmoj so we've settled on an API with two params:
Is this correct? 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. (already posted this on slack, but repeating so it's visible to all)
|
||
editType: 'plot', | ||
description: [ | ||
'Automatically reposition the axis to avoid', | ||
'overlap with other axes with the same `overlaying` value.', | ||
'This repositioning will account for any `shift` amount applied to other', | ||
'axes on the same side with `autoshift` is set to true.', | ||
'Only has an effect if `anchor` is set to *free*.', | ||
].join(' ') | ||
}, | ||
shift: { | ||
valType: 'number', | ||
editType: 'plot', | ||
description: [ | ||
'Moves the axis a given number of pixels from where it would have been otherwise.', | ||
'Accepts both positive and negative values, which will shift the axis either right', | ||
'or left, respectively.', | ||
'If `autoshift` is set to true, then this defaults to a padding of -3 if `side` is set to *left*.', | ||
'and defaults to +3 if `side` is set to *right*. Defaults to 0 if `autoshift` is set to false.', | ||
'Only has an effect if `anchor` is set to *free*.' | ||
].join(' ') | ||
}, | ||
categoryorder: { | ||
valType: 'enumerated', | ||
values: [ | ||
|
Uh oh!
There was an error while loading. Please reload this page.