diff --git a/package-lock.json b/package-lock.json index 6fc0a4476d1..fbf25882776 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8861,9 +8861,9 @@ } }, "regl-line2d": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/regl-line2d/-/regl-line2d-3.0.11.tgz", - "integrity": "sha512-nf0Ftpf6boR0oJ24Gs77J8pQE0wet59T1TkrK1f0TWKJgWgRXByxRHDD92m/KZ2dpl+XTvCORk2NRqitSJGwWw==", + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/regl-line2d/-/regl-line2d-3.0.12.tgz", + "integrity": "sha512-6KV6ZbVWeoMZDqkVdqbWpvzrQR1BFOOUHMoyi1HDkZ3TXuS88s1/vQghTJjaLDRBVV5krZfIMpBrePY7OMxDIQ==", "requires": { "array-bounds": "^1.0.0", "array-normalize": "^1.1.3", diff --git a/package.json b/package.json index 6dbd9305fc7..05a6b164e45 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test/image/baselines/gl2d_lines_almost_horizontal_vertical.png b/test/image/baselines/gl2d_lines_almost_horizontal_vertical.png new file mode 100644 index 00000000000..6eab8e3ed5f Binary files /dev/null and b/test/image/baselines/gl2d_lines_almost_horizontal_vertical.png differ diff --git a/test/image/baselines/gl2d_scattergl_simple_line_reversed_ranges.png b/test/image/baselines/gl2d_scattergl_simple_line_reversed_ranges.png new file mode 100644 index 00000000000..57bcc0c9591 Binary files /dev/null and b/test/image/baselines/gl2d_scattergl_simple_line_reversed_ranges.png differ diff --git a/test/image/mocks/gl2d_lines_almost_horizontal_vertical.json b/test/image/mocks/gl2d_lines_almost_horizontal_vertical.json new file mode 100644 index 00000000000..1d27d5d0ac2 --- /dev/null +++ b/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" } +} diff --git a/test/image/mocks/gl2d_scattergl_simple_line_reversed_ranges.json b/test/image/mocks/gl2d_scattergl_simple_line_reversed_ranges.json new file mode 100644 index 00000000000..2b2531a61e8 --- /dev/null +++ b/test/image/mocks/gl2d_scattergl_simple_line_reversed_ranges.json @@ -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" } +}