Skip to content

Commit d5c82c6

Browse files
committed
Add a tests for scatter simplify: false
1 parent a311922 commit d5c82c6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/plots/transition_attributes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ module.exports = {
1212
duration: {
1313
valType: 'number',
1414
role: 'info',
15-
dflt: 500,
1615
min: 0,
16+
dflt: 500,
1717
description: [
1818
'The duration of the transition, in milliseconds. If equal to zero,',
1919
'updates are synchronous.'

test/jasmine/tests/scatter_test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,12 @@ describe('Test scatter', function() {
237237
expect(ptsOut).toEqual([[[0, 0], [15, 30], [22, 16], [30, 0]]]);
238238
});
239239

240+
it('should not collapse straight lines if simplify is false', function() {
241+
var ptsIn = [[0, 0], [5, 10], [13, 26], [15, 30], [22, 16], [28, 4], [30, 0]];
242+
var ptsOut = callLinePoints(ptsIn, {simplify: false});
243+
expect(ptsOut).toEqual([ptsIn]);
244+
});
245+
240246
it('should separate out blanks, unless connectgaps is true', function() {
241247
var ptsIn = [
242248
[0, 0], [10, 20], [20, 10], [undefined, undefined],

0 commit comments

Comments
 (0)