Skip to content

Commit

Permalink
Merge pull request #3078 from plotly/rev-bounds2d
Browse files Browse the repository at this point in the history
Upgrade regl-line2d module to fix scattergl bug when using reversed bounds with only line type, issue #2904
  • Loading branch information
archmoj committed Oct 24, 2018
2 parents 7ae6fd6 + dadbd23 commit 94c9d98
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -102,7 +102,7 @@
"polybooljs": "^1.2.0",
"regl": "^1.3.7",
"regl-error2d": "^2.0.5",
"regl-line2d": "^3.0.11",
"regl-line2d": "^3.0.12",
"regl-scatter2d": "^3.0.6",
"regl-splom": "^1.0.4",
"right-now": "^1.0.0",
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions test/image/mocks/gl2d_lines_almost_horizontal_vertical.json
@@ -0,0 +1,13 @@
{
"data":
[
{"mode":"lines", "line":{"width": 4}, "x":[1, 2, 3, 4], "y":[4, 4, 4.0001, 3.9999], "type":"scatter", "name":"scatter almost horizontal"},
{"mode":"lines", "line":{"width": 4}, "x":[1, 2, 3, 4], "y":[3, 3, 3.0001, 2.9999], "type":"scattergl", "name":"scattergl almost horizontal"},
{"mode":"lines", "line":{"width": 4}, "x":[1, 2, 3, 4], "y":[2, 2, 2, 2], "type":"scattergl", "name":"scattergl horizontal"},
{"mode":"lines", "line":{"width": 4}, "x":[1, 2, 3, 4], "y":[1, 1, 1, 1], "type":"scatter", "name":"scatter horizontal"},
{"mode":"lines", "line":{"width": 4}, "y":[1, 2, 3, 4], "x":[4, 4, 4.0001, 3.9999], "type":"scatter", "name":"scatter almost vertical"},
{"mode":"lines", "line":{"width": 4}, "y":[1, 2, 3, 4], "x":[3, 3, 3.0001, 2.9999], "type":"scattergl", "name":"scattergl almost vertical"},
{"mode":"lines", "line":{"width": 4}, "y":[1, 2, 3, 4], "x":[2, 2, 2, 2], "type":"scattergl", "name":"scattergl vertical"},
{"mode":"lines", "line":{"width": 4}, "y":[1, 2, 3, 4], "x":[1, 1, 1, 1], "type":"scatter", "name":"scatter vertical"}
], "layout": {"width":800, "height":600, "xaxis":{"range":[4.5, 0.5]}, "yaxis":{"range":[4.5, 0.5]}, "title": "exact and approximate horizontal and vertical lines using scatter and scattergl with reversed ranges" }
}
@@ -0,0 +1,8 @@
{
"data":
[
{ "type": "scattergl", "mode": "lines", "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "y": [0, 1, 0, 7, 7, 0, 2, 4, 3, 0], "line": { "width": 10, "dash": "solid" } },
{ "type": "scattergl", "mode": "lines", "y": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "x": [0, 1, 0, 7, 7, 0, 2, 4, 3, 0], "line": { "width": 10, "dash": "solid" } }
],
"layout": {"width":800, "height":600, "xaxis":{ "range": [-1, 11] }, "yaxis":{ "autorange": "reversed" }, "title": "simple scatter lines (without markers or text) with reversed ranges" }
}

0 comments on commit 94c9d98

Please sign in to comment.