Skip to content

Commit 5a998a2

Browse files
committed
Merge branch 'master' into polar-hole
2 parents d466146 + fdae65b commit 5a998a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+3544
-607
lines changed

package-lock.json

+66-27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
},
5757
"dependencies": {
5858
"3d-view": "^2.0.0",
59-
"@etpinard/gl-text": "^1.1.6",
6059
"@plotly/d3-sankey": "^0.5.0",
6160
"alpha-shape": "^1.0.0",
6261
"array-range": "^1.0.1",
@@ -85,6 +84,7 @@
8584
"gl-spikes2d": "^1.0.1",
8685
"gl-streamtube3d": "^1.0.0",
8786
"gl-surface3d": "^1.3.5",
87+
"gl-text": "^1.1.6",
8888
"glslify": "^6.2.1",
8989
"has-hover": "^1.0.1",
9090
"has-passive-events": "^1.0.0",
@@ -103,7 +103,7 @@
103103
"regl-error2d": "^2.0.5",
104104
"regl-line2d": "^3.0.9",
105105
"regl-scatter2d": "^3.0.6",
106-
"regl-splom": "^1.0.3",
106+
"regl-splom": "^1.0.4",
107107
"right-now": "^1.0.0",
108108
"robust-orientation": "^1.1.3",
109109
"sane-topojson": "^2.0.0",
@@ -142,6 +142,7 @@
142142
"karma-jasmine-spec-tags": "^1.0.1",
143143
"karma-spec-reporter": "0.0.32",
144144
"karma-verbose-reporter": "0.0.6",
145+
"karma-viewport": "^1.0.2",
145146
"madge": "^3.2.0",
146147
"minify-stream": "^1.2.0",
147148
"minimist": "^1.2.0",

src/components/errorbars/calc.js

+20-3
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,29 @@ function calcOneAxis(calcTrace, trace, axis, coord) {
4343
var computeError = makeComputeError(opts);
4444

4545
for(var i = 0; i < calcTrace.length; i++) {
46-
var calcPt = calcTrace[i],
47-
calcCoord = calcPt[coord];
46+
var calcPt = calcTrace[i];
47+
48+
var iIn = calcPt.i;
49+
50+
// for types that don't include `i` in each calcdata point
51+
if(iIn === undefined) iIn = i;
52+
53+
// for stacked area inserted points
54+
// TODO: errorbars have been tested cursorily with stacked area,
55+
// but not thoroughly. It's not even really clear what you want to do:
56+
// Should it just be calculated based on that trace's size data?
57+
// Should you add errors from below in quadrature?
58+
// And what about normalization, where in principle the errors shrink
59+
// again when you get up to the top end?
60+
// One option would be to forbid errorbars with stacking until we
61+
// decide how to handle these questions.
62+
else if(iIn === null) continue;
63+
64+
var calcCoord = calcPt[coord];
4865

4966
if(!isNumeric(axis.c2l(calcCoord))) continue;
5067

51-
var errors = computeError(calcCoord, i);
68+
var errors = computeError(calcCoord, iIn);
5269
if(isNumeric(errors[0]) && isNumeric(errors[1])) {
5370
var shoe = calcPt[coord + 's'] = calcCoord - errors[0],
5471
hat = calcPt[coord + 'h'] = calcCoord + errors[1];

0 commit comments

Comments
 (0)