diff --git a/src/plots/cartesian/layout_attributes.js b/src/plots/cartesian/layout_attributes.js index fe77d6fb915..caca53ef82e 100644 --- a/src/plots/cartesian/layout_attributes.js +++ b/src/plots/cartesian/layout_attributes.js @@ -329,7 +329,7 @@ module.exports = { operation: { valType: 'enumerated', values: ['[]', '()', '[)', '(]'], - dflt: '()', + dflt: '[]', role: 'info', editType: 'calc', description: [ diff --git a/test/image/mocks/axes_breaks-finance.json b/test/image/mocks/axes_breaks-finance.json index 9da3dac8ae1..21b7056a1b6 100644 --- a/test/image/mocks/axes_breaks-finance.json +++ b/test/image/mocks/axes_breaks-finance.json @@ -364,11 +364,11 @@ "rangebreaks": [ { "pattern": "%w", - "bounds": [ 6, 0 ], - "operation": "[]" + "bounds": [ 6, 0 ] }, { - "values": ["2017-01-16"] + "values": ["2017-01-16"], + "operation": "()" } ] }, @@ -377,11 +377,11 @@ "rangebreaks": [ { "pattern": "%w", - "bounds": [ 6, 0 ], - "operation": "[]" + "bounds": [ 6, 0 ] }, { - "values": ["2017-01-16"] + "values": ["2017-01-16"], + "operation": "()" } ] }, diff --git a/test/image/mocks/axes_breaks-tickvals.json b/test/image/mocks/axes_breaks-tickvals.json index ddebfa8ed8d..83e7277ad72 100644 --- a/test/image/mocks/axes_breaks-tickvals.json +++ b/test/image/mocks/axes_breaks-tickvals.json @@ -20,11 +20,11 @@ {"bounds": [ "1969-12-31 23:59:59.999", "1970-01-01 00:00:00.090" - ]}, + ], "operation": "()"}, {"bounds": [ "1970-01-01 00:00:00.101", "1970-01-01 00:00:00.189" - ]} + ], "operation": "()"} ], "tickvals": [ "1969-12-31 23:59:59.980", diff --git a/test/image/mocks/axes_breaks-values.json b/test/image/mocks/axes_breaks-values.json index 3469b58471e..a4b7bdbd5fb 100644 --- a/test/image/mocks/axes_breaks-values.json +++ b/test/image/mocks/axes_breaks-values.json @@ -14,7 +14,7 @@ "layout": { "xaxis": { "rangebreaks": [ - { "values": [ "2020-01-04", "2020-01-05" ] } + { "values": [ "2020-01-04", "2020-01-05" ], "operation": "()" } ] } } diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js index c67109132a9..3f25a078996 100644 --- a/test/jasmine/tests/axes_test.js +++ b/test/jasmine/tests/axes_test.js @@ -4179,11 +4179,11 @@ describe('Test axes', function() { }, { xaxis: { rangebreaks: [ - {pattern: '%H', bounds: [17, 8]} + {pattern: '%H', bounds: [17, 8], operation: '()'} ] } }); - _assert('with dflt operation', [ + _assert('with () operation', [ 1577952000000, BADNUM, 1578038400000, BADNUM, 1578124800000, BADNUM, @@ -4207,7 +4207,7 @@ describe('Test axes', function() { }, { xaxis: { rangebreaks: [ - {pattern: '%H', bounds: [17, 8]} + {pattern: '%H', bounds: [17, 8], operation: '()'} ] } }); @@ -4284,7 +4284,7 @@ describe('Test axes', function() { {bounds: [ '1970-01-01 00:00:00.002', '1970-01-01 00:00:00.003' - ]} + ], operation: '()'} ] } }); @@ -4466,11 +4466,11 @@ describe('Test axes', function() { {bounds: [ '1969-12-31 23:59:59.990', '1970-01-01 00:00:00.089' - ]}, + ], operation: '()'}, {bounds: [ '1970-01-01 00:00:00.101', '1970-01-01 00:00:00.189' - ]} + ], operation: '()'} ]; return Plotly.react(gd, gd.data, gd.layout); }) @@ -4506,11 +4506,11 @@ describe('Test axes', function() { {bounds: [ '1969-12-31 23:59:59.989', '1970-01-01 00:00:00.090' - ]}, + ], operation: '()'}, {bounds: [ '1970-01-01 00:00:00.101', '1970-01-01 00:00:00.300' - ]} + ], operation: '()'} ]; return Plotly.react(gd, gd.data, gd.layout); }) @@ -4611,7 +4611,7 @@ describe('Test axes', function() { }) .then(function() { gd.layout.xaxis.rangebreaks = [ - {pattern: '%w', bounds: [5, 1]} + {pattern: '%w', bounds: [5, 1], operation: '()'} ]; return Plotly.react(gd, gd.data, gd.layout); }) @@ -4641,7 +4641,7 @@ describe('Test axes', function() { }) .then(function() { gd.layout.xaxis.rangebreaks = [ - {pattern: '%w', bounds: [4, 6]} + {pattern: '%w', bounds: [4, 6], operation: '()'} ]; return Plotly.react(gd, gd.data, gd.layout); }) @@ -4680,7 +4680,7 @@ describe('Test axes', function() { }) .then(function() { gd.layout.xaxis.rangebreaks = [ - {pattern: '%H', bounds: [17, 8]} + {pattern: '%H', bounds: [17, 8], operation: '()'} ]; return Plotly.react(gd, gd.data, gd.layout); }) @@ -4705,8 +4705,8 @@ describe('Test axes', function() { }) .then(function() { gd.layout.xaxis.rangebreaks = [ - {pattern: '%w', bounds: [5, 1]}, - {pattern: '%H', bounds: [17, 8]} + {pattern: '%w', bounds: [5, 1], operation: '()'}, + {pattern: '%H', bounds: [17, 8], operation: '()'} ]; return Plotly.react(gd, gd.data, gd.layout); }) @@ -4728,8 +4728,8 @@ describe('Test axes', function() { }) .then(function() { gd.layout.xaxis.rangebreaks = [ - {pattern: '%H', bounds: [17, 8]}, - {pattern: '%w', bounds: [5, 1]} + {pattern: '%H', bounds: [17, 8], operation: '()'}, + {pattern: '%w', bounds: [5, 1], operation: '()'} ]; return Plotly.react(gd, gd.data, gd.layout); }) @@ -4751,7 +4751,7 @@ describe('Test axes', function() { }) .then(function() { gd.layout.xaxis.rangebreaks = [ - {pattern: '%H', bounds: [17, 8]} + {pattern: '%H', bounds: [17, 8], operation: '()'} ]; // N.B. xaxis.range[0] falls within a break gd.layout.xaxis.autorange = false; @@ -4772,7 +4772,7 @@ describe('Test axes', function() { }) .then(function() { gd.layout.xaxis.rangebreaks = [ - {pattern: '%w', bounds: [1, 4]} + {pattern: '%w', bounds: [1, 4], operation: '()'} ]; // N.B. xaxis.range[0] falls within a break gd.layout.xaxis.autorange = false;