diff --git a/src/traces/box/attributes.js b/src/traces/box/attributes.js index 98aa92f6f64..fdd2e6e4d7a 100644 --- a/src/traces/box/attributes.js +++ b/src/traces/box/attributes.js @@ -96,12 +96,12 @@ module.exports = { notchwidth: { valType: 'number', min: 0, - max: 1, + max: 0.5, dflt: 0.25, role: 'style', editType: 'calcIfAutorange', description: [ - 'Sets the width of the notches inversely proportional to', + 'Sets the width of the notches relative to', 'the box\' width.', 'For example, with 0, the notches are as wide as the box(es).' ].join(' ') diff --git a/src/traces/box/plot.js b/src/traces/box/plot.js index a5f953278d9..f1121f9982e 100644 --- a/src/traces/box/plot.js +++ b/src/traces/box/plot.js @@ -102,7 +102,7 @@ function plotBoxAndWhiskers(sel, axes, trace, t) { var bPosPxOffset = t.bPosPxOffset || 0; var whiskerWidth = trace.whiskerwidth || 0; var notched = trace.notched || false; - var nw = notched ? 1 - trace.notchwidth : 1; + var nw = notched ? 1 - 2 * trace.notchwidth : 1; // to support for one-sided box var bdPos0; diff --git a/test/image/baselines/box_horz_notched.png b/test/image/baselines/box_horz_notched.png index 91452404315..1f6d737725f 100644 Binary files a/test/image/baselines/box_horz_notched.png and b/test/image/baselines/box_horz_notched.png differ diff --git a/test/image/baselines/box_notched.png b/test/image/baselines/box_notched.png index 3fdf5ab3165..c2449e12d04 100644 Binary files a/test/image/baselines/box_notched.png and b/test/image/baselines/box_notched.png differ