-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expose minreducedwidth
and minreducedheight
to API
#6307
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 4 commits
aeaba5c
f826ef7
bb2ca73
1c7cc49
61807ba
d692c7e
7fc8514
c53e084
2fc928d
0effd0f
6a43af4
21f71e6
93b05d3
0fff290
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 |
---|---|---|
|
@@ -228,6 +228,20 @@ module.exports = { | |
'between the plotting area and the axis lines' | ||
].join(' ') | ||
}, | ||
minreducedwidth: { | ||
valType: 'number', | ||
min: 0, | ||
dflt: 64, | ||
editType: 'plot', | ||
description: 'Minimum width of the plot with automargin applied.' | ||
}, | ||
minreducedheight: { | ||
valType: 'number', | ||
min: 0, | ||
dflt: 64, | ||
editType: 'plot', | ||
description: 'Minimum height of the plot with automargin applied.' | ||
}, | ||
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 Is there a better place to put these new attributes in? 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. @archmoj and I discussed this a bit earlier today, and I think the conclusion we came to was: because The only question is whether it's really true that these attributes are irrelevant when 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. Addressed in 93b05d3. 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. yes, @archmoj and I looked into the source code and decided that these attributes would be best placed at the top level of layout parameters as they could be related to |
||
autoexpand: { | ||
valType: 'boolean', | ||
dflt: true, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"data": [{ | ||
"name": "< D E A T H >", | ||
"marker": { "color": "red" }, | ||
"x": [ | ||
"Antonio Vivaldi", | ||
"Johann Sebastian Bach", | ||
"Wolfgang Amadeus Mozart", | ||
"Ludwig van Beethoven" | ||
], | ||
"y": [ | ||
"1741", | ||
"1750", | ||
"1791", | ||
"1827" | ||
] | ||
}, | ||
{ | ||
"name": "< B I R T H >", | ||
"marker": { "color": "blue" }, | ||
"x": [ | ||
"Antonio Vivaldi", | ||
"Johann Sebastian Bach", | ||
"Wolfgang Amadeus Mozart", | ||
"Ludwig van Beethoven" | ||
], | ||
"y": [ | ||
"1678", | ||
"1685", | ||
"1756", | ||
"1770" | ||
] | ||
}], | ||
"layout": { | ||
"title": { | ||
"text": "Longest and shortest<br>names and time periods" | ||
}, | ||
"width": 240, | ||
"height": 300, | ||
"margin": { | ||
"t": 80, | ||
"b": 20, | ||
"l": 20, | ||
"r": 20, | ||
"minreducedheight": 55 | ||
}, | ||
"yaxis": { | ||
"type": "date", | ||
"automargin": true | ||
}, | ||
"xaxis": { | ||
"automargin": true | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"data": [{ | ||
"name": "< D E A T H >", | ||
"marker": { "color": "red" }, | ||
"y": [ | ||
"Antonio Vivaldi but even longer", | ||
hannahker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"Johann Sebastian Bach but even longer", | ||
"Wolfgang Amadeus Mozart but even longer", | ||
"Ludwig van Beethoven but even longer" | ||
], | ||
"x": [ | ||
"1741", | ||
"1750", | ||
"1791", | ||
"1827" | ||
] | ||
}, | ||
{ | ||
"name": "< B I R T H >", | ||
"marker": { "color": "blue" }, | ||
"y": [ | ||
"Antonio Vivaldi but even longer", | ||
"Johann Sebastian Bach but even longer", | ||
"Wolfgang Amadeus Mozart but even longer", | ||
"Ludwig van Beethoven but even longer" | ||
], | ||
"x": [ | ||
"1678", | ||
"1685", | ||
"1756", | ||
"1770" | ||
] | ||
}], | ||
"layout": { | ||
"showlegend": false, | ||
"title": { | ||
"text": "Longest and shortest<br>names and time periods" | ||
}, | ||
"width": 240, | ||
"height": 200, | ||
"margin": { | ||
"t": 80, | ||
"b": 20, | ||
"l": 20, | ||
"r": 20, | ||
"minreducedwidth": 55 | ||
}, | ||
"xaxis": { | ||
"type": "date", | ||
"automargin": true | ||
}, | ||
"yaxis": { | ||
"automargin": true | ||
} | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.