Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f6f2048

Browse filesBrowse files
authored
Merge pull request #1567 from dfcreative/patch-1
Cast to empty array
2 parents e612205 + 569d7e5 commit f6f2048
Copy full SHA for f6f2048

File tree

Expand file treeCollapse file tree

2 files changed

+15
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+15
-1
lines changed

‎src/components/errorbars/index.js

Copy file name to clipboardExpand all lines: src/components/errorbars/index.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ errorBars.calc = require('./calc');
1919

2020
errorBars.calcFromTrace = function(trace, layout) {
2121
var x = trace.x || [],
22-
y = trace.y,
22+
y = trace.y || [],
2323
len = x.length || y.length;
2424

2525
var calcdataMock = new Array(len);

‎test/jasmine/tests/gl_plot_interact_test.js

Copy file name to clipboardExpand all lines: test/jasmine/tests/gl_plot_interact_test.js
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,20 @@ describe('Test gl2d plots', function() {
984984
.catch(fail)
985985
.then(done);
986986
});
987+
988+
it('should change plot type with incomplete data', function(done) {
989+
Plotly.plot(gd, [{}]);
990+
991+
expect(function() {
992+
Plotly.restyle(gd, {type: 'scattergl', x: [[1]]}, 0);
993+
}).not.toThrow();
994+
995+
expect(function() {
996+
Plotly.restyle(gd, {y: [[1]]}, 0);
997+
}).not.toThrow();
998+
999+
done();
1000+
});
9871001
});
9881002

9891003
describe('Test removal of gl contexts', function() {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.