Skip to content

Commit 453d329

Browse files
committed
Implement 'smarter' notched/notchwidth default
I deliberately removed `"notched":true` in one of test box traces so it is (indirectly) tested
1 parent 0eb99e0 commit 453d329

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

src/traces/box/attributes.js

-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ module.exports = {
8787
},
8888
notched: {
8989
valType: 'boolean',
90-
dflt: false,
9190
role: 'style',
9291
editType: 'calcIfAutorange',
9392
description: [

src/traces/box/defaults.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
2929
coerce('whiskerwidth');
3030
coerce('boxmean');
3131

32-
var notched = coerce('notched');
32+
var notched = coerce('notched', traceIn.notchwidth !== undefined);
3333
if(notched) coerce('notchwidth');
3434

3535
handlePointsDefaults(traceIn, traceOut, coerce, {prefix: 'box'});

test/image/mocks/box_notched.json

-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
},
145145
"type":"box",
146146
"name":"Notch width = 0.8",
147-
"notched":true,
148147
"notchwidth":0.8
149148
},
150149
{

0 commit comments

Comments
 (0)