Skip to content

Commit 789121c

Browse files
committed
update violin layout attr descriptions
1 parent ea66dea commit 789121c

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

src/traces/violin/layout_attributes.js

+23-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,29 @@
99
'use strict';
1010

1111
var boxLayoutAttrs = require('../box/layout_attributes');
12+
var extendFlat = require('../../lib').extendFlat;
1213

13-
// TODO update descriptions
1414
module.exports = {
15-
violinmode: boxLayoutAttrs.boxmode,
16-
violingap: boxLayoutAttrs.boxgap,
17-
violingroupgap: boxLayoutAttrs.boxgroupgap
15+
violinmode: extendFlat({}, boxLayoutAttrs.boxmode, {
16+
description: [
17+
'Determines how violins at the same location coordinate',
18+
'are displayed on the graph.',
19+
'If *group*, the violins are plotted next to one another',
20+
'centered around the shared location.',
21+
'If *overlay*, the violins are plotted over one another,',
22+
'you might need to set *opacity* to see them multiple violins.'
23+
].join(' ')
24+
}),
25+
violingap: extendFlat({}, boxLayoutAttrs.boxgap, {
26+
description: [
27+
'Sets the gap (in plot fraction) between violins of',
28+
'adjacent location coordinates.'
29+
].join(' ')
30+
}),
31+
violingroupgap: extendFlat({}, boxLayoutAttrs.boxgroupgap, {
32+
description: [
33+
'Sets the gap (in plot fraction) between violins of',
34+
'the same location coordinate.'
35+
].join(' ')
36+
})
1837
};

0 commit comments

Comments
 (0)