10000 adapt tickon:'boundaries' logic for multicategory axes · lzhice/plotly.js@d986f94 · GitHub
[go: up one dir, main page]

Skip to content

Commit d986f94

Browse files
committed
adapt tickon:'boundaries' logic for multicategory axes
1 parent 86f710c commit d986f94

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/plots/cartesian/axes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2392,7 +2392,7 @@ axes.drawLabels = function(gd, ax, opts) {
23922392

23932393
var autoangle = 0;
23942394

2395-
if(ax.tickson === 'boundaries') {
2395+
if(ax.tickson === 'boundaries' && cls === ax._id + 'tick') {
23962396
var gap = 2;
23972397
if(ax.ticks) gap += ax.tickwidth / 2;
23982398

src/plots/cartesian/axis_defaults.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce,
9191
if(options.automargin) coerce('automargin');
9292

9393
if(!options.noTickson &&
94-
containerOut.type === 'category' && (containerOut.ticks || containerOut.showgrid)) {
94+
(containerOut.type === 'category' || containerOut.type === 'multicategory') &&
95+
(containerOut.ticks || containerOut.showgrid)
96+
) {
9597
coerce('tickson');
9698
}
9799

src/plots/cartesian/layout_attributes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ module.exports = {
323323
description: [
324324
'Determines where ticks and grid lines are drawn with respect to their',
325325
'corresponding tick labels.',
326-
'Only has an effect for axes of `type` *category*.',
326+
'Only has an effect for axes of `type` *category* or *multicategory*.',
327327
'When set to *boundaries*, ticks and grid lines are drawn half a category',
328328
'to the left/bottom of labels.'
329329
].join(' ')

0 commit comments

Comments
 (0)
0