Skip to content

Commit f76ca97

Browse files
update dPos with vwidth//remove most console.logs
1 parent 8f04d13 commit f76ca97

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

src/plots/plots.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2612,6 +2612,9 @@ function doCrossTraceCalc(gd) {
26122612
fullLayout[sp];
26132613

26142614
for(j = 0; j < methods.length; j++) {
2615+
console.log(methods);
2616+
console.log(methods[j])
2617+
console.log(methods[j].type)
26152618
methods[j](gd, spInfo, sp);
26162619
}
26172620
}

src/traces/box/cross_trace_calc.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,10 @@ function setPositionOffset(traceType, gd, boxList, posAxis, pad, vwidth) {
7676
// and then use for posAxis autorange
7777
var boxdv = Lib.distinctVals(pointList);
7878
var dPos = boxdv.minDiff / 2;
79-
console.log('');
80-
console.log('minDiff is ' + boxdv.minDiff);
81-
console.log('dPos is ' + dPos);
82-
// var dPos = 0.05
83-
var dPos = 0.5
84-
85-
if (vwidth) {
86-
console.log('vwidth is ' + vwidth);
79+
80+
// override dPos if violin width given
81+
if (vwidth != false) {
82+
dPos = vwidth;
8783
}
8884

8985
// if there's no duplication of x points,

src/traces/box/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
2828

2929
coerce('whiskerwidth');
3030
coerce('boxmean');
31+
coerce('vwidth');
3132

3233
var notched = coerce('notched', traceIn.notchwidth !== undefined);
3334
if(notched) coerce('notchwidth');

src/traces/violin/cross_trace_calc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ module.exports = function crossTraceCalc(gd, plotinfo) {
4343
}
4444
}
4545

46-
setPositionOffset('violin', gd, violinList, posAxis, [minPad, maxPad], vwidth);
46+
setPositionOffset('violin', gd, violinList, posAxis, [minPad, maxPad], trace.vwidth);
4747
}
4848
};

src/traces/violin/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
2929
coerce('scalegroup', traceOut.name);
3030
coerce('scalemode');
3131
coerce('side');
32+
coerce('vwidth');
3233

3334
var span = coerce('span');
3435
var spanmodeDflt;

0 commit comments

Comments
 (0)