Skip to content

Commit 8547cf8

Browse files
committed
test duplicate position stacking
and remove error check added just for debugging during dev
1 parent be38e93 commit 8547cf8

File tree

3 files changed

+42
-4
lines changed

3 files changed

+42
-4
lines changed

src/traces/scatter/cross_trace_calc.js

-4
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,6 @@ module.exports = function crossTraceCalc(gd, plotinfo) {
136136
sumj = cd0[j][valAttr] = cd0[j].s;
137137
for(i = 1; i < indices.length; i++) {
138138
cd = calcTraces[indices[i]];
139-
if(cd.length !== serieslen) {
140-
// TODO: verify this never happens and remove
141-
throw new Error('length mismatch!');
142-
}
143139
cd[0].trace._rawLength = cd[0].trace._length;
144140
cd[0].trace._length = serieslen;
145141
sumj += cd[j].s;
42.7 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"data": [
3+
{
4+
"x": [1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 6, 8],
5+
"y": [1, 3, 2, 5, 4, 5, 4, 3, 2, 4, 6, 3, 5, 4, 3],
6+
"stackgroup": "a", "mode": "lines+markers"
7+
}, {
8+
"x": [1, 2, 2, 2, 2, 3, 5, 5, 5, 5, 6, 6, 6, 6, 8],
9+
"y": [4, 4, 4, 4, 6, 5, 6, 5, 7, 6, 5, 6, 7, 8, 7],
10+
"stackgroup": "a", "mode": "lines+markers"
11+
}, {
12+
"x": [2, 2, 2, 2, 3, 4, 4, 4, 4, 5, 7, 7, 7, 7, 8],
13+
"y": [5, 5, 4, 5, 6, 7, 6, 5, 4, 5, 4, 5, 6, 3, 4],
14+
"stackgroup": "a", "mode": "lines+markers"
15+
},
16+
17+
{
18+
"x": [1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 6, 8],
19+
"y": [1, 3, 2, 5, 4, 5, 4, 3, 2, 4, 6, 3, 5, 4, 3],
20+
"stackgroup": "a", "mode": "lines+markers",
21+
"xaxis": "x2", "yaxis": "y2", "stackgaps": "interpolate"
22+
}, {
23+
"x": [1, 2, 2, 2, 2, 3, 5, 5, 5, 5, 6, 6, 6, 6, 8],
24+
"y": [4, 4, 4, 4, 6, 5, 6, 5, 7, 6, 5, 6, 7, 8, 7],
25+
"stackgroup": "a", "mode": "lines+markers",
26+
"xaxis": "x2", "yaxis": "y2", "stackgaps": "interpolate"
27+
}, {
28+
"x": [2, 2, 2, 2, 3, 4, 4, 4, 4, 5, 7, 7, 7, 7, 8],
29+
"y": [5, 5, 4, 5, 6, 7, 6, 5, 4, 5, 4, 5, 6, 3, 4],
30+
"stackgroup": "a", "mode": "lines+markers",
31+
"xaxis": "x2", "yaxis": "y2", "stackgaps": "interpolate"
32+
}
33+
],
34+
"layout": {
35+
"width": 500,
36+
"height": 500,
37+
"title": "Duplicate positions",
38+
"xaxis": {"title": "infer zero"},
39+
"xaxis2": {"title": "interpolate"},
40+
"grid": {"columns": 1, "rows": 2, "pattern": "independent"}
41+
}
42+
}

0 commit comments

Comments
 (0)