diff --git a/src/traces/box/cross_trace_calc.js b/src/traces/box/cross_trace_calc.js index a835797c5aa..9fcb0a9823b 100644 --- a/src/traces/box/cross_trace_calc.js +++ b/src/traces/box/cross_trace_calc.js @@ -73,12 +73,6 @@ function setPositionOffset(traceType, gd, boxList, posAxis) { var boxdv = Lib.distinctVals(pointList); var dPos0 = boxdv.minDiff / 2; - // if there's no duplication of x points, - // disable 'group' mode by setting counter to 1 - if(pointList.length === boxdv.vals.length) { - fullLayout[numKey] = 1; - } - // check for forced minimum dtick Axes.minDtick(posAxis, boxdv.minDiff, boxdv.vals[0], true); diff --git a/test/image/baselines/box_single-group.png b/test/image/baselines/box_single-group.png new file mode 100644 index 00000000000..1c149acda8f Binary files /dev/null and b/test/image/baselines/box_single-group.png differ diff --git a/test/image/mocks/box_single-group.json b/test/image/mocks/box_single-group.json new file mode 100644 index 00000000000..199044e9d7d --- /dev/null +++ b/test/image/mocks/box_single-group.json @@ -0,0 +1,16 @@ +{ + "data": [{ + "type": "box", + "x0": 1, + "y": [1, 2, 1, 2, 1, 2, 3, 4, 4] + }, { + "type": "box", + "x0": 2, + "y": [2, 1, 2, 3, 3, 1, 0, 0, 1] + }], + "layout": { + "title": {"text": "single-box groups!"}, + "boxmode": "group", + "showlegend": false + } +}