Skip to content

Commit c02573b

Browse files
committed
Add axis overlaying adjustments like for yaxis
1 parent ca05f19 commit c02573b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/components/fields/AxisCreator.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ class UnconnectedNewAxisCreator extends Component {
4242
},
4343
});
4444
}
45+
46+
if (attr === 'xaxis') {
47+
onUpdate({
48+
type: EDITOR_ACTIONS.UPDATE_LAYOUT,
49+
payload: {
50+
update: {
51+
[`${attr + (fullLayout._subplots[attr].length + 1)}.side`]: 'top',
52+
[`${attr +
53+
(fullLayout._subplots[attr].length + 1)}.overlaying`]: 'x',
54+
},
55+
},
56+
});
57+
}
4558
}
4659

4760
recalcAxes(update) {

0 commit comments

Comments
 (0)