Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f40dbd4

Browse files
committed
Legend: add attribute orientation
1 parent ddc6d71 commit f40dbd4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/components/legend/attributes.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ module.exports = {
3535
font: extendFlat({}, fontAttrs, {
3636
description: 'Sets the font used to text the legend items.'
3737
}),
38+
orientation: {
39+
valType: 'enumerated',
40+
values: ['v', 'h'],
41+
dflt: 'v',
42+
role: 'info',
43+
description: 'Sets the orientation of the legend.'
44+
},
3845
traceorder: {
3946
valType: 'flaglist',
4047
flags: ['reversed', 'grouped'],

src/components/legend/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) {
5757
coerce('bordercolor');
5858
coerce('borderwidth');
5959
Lib.coerceFont(coerce, 'font', layoutOut.font);
60+
coerce('orientation');
6061

6162
coerce('traceorder', defaultOrder);
6263
if(helpers.isGrouped(layoutOut.legend)) coerce('tracegroupgap');

0 commit comments

Comments
 (0)