-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Implement layout.legend.orientation
(closes #53)
#535
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
Changes from 11 commits
ff16df1
ddc6d71
f40dbd4
92ff540
869538c
b2538e1
9dc2609
f68344b
c0dfc8a
e5049c9
23e3972
25c2970
7d502fa
107883a
65aa6c0
8c6d47a
bc20390
c1632d4
313976d
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 |
---|---|---|
|
@@ -57,6 +57,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) { | |
coerce('bordercolor'); | ||
coerce('borderwidth'); | ||
Lib.coerceFont(coerce, 'font', layoutOut.font); | ||
coerce('orientation'); | ||
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. We should add some smart default logic so that if a user set Moreover, maybe we should make the default @mdtusz @chriddyp @jackparmer should the default horizontal legend start at the bottom-left or at the top-left corner of the plot area? 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'd think bottom left but if we do this, we will need to take into account the case where range sliders are present. The legend is currently rendered below it so it gets hidden if it is placed in the same place. |
||
|
||
coerce('traceorder', defaultOrder); | ||
if(helpers.isGrouped(layoutOut.legend)) coerce('tracegroupgap'); | ||
|
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.
@etpinard @cldougl @chriddyp
Do we want
v
/h
orvertical
/horizontal
?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.
'v'
/'h'
gets my vote - for parity with barorientation
.