Skip to content

Commit 2146bdd

Browse files
committed
merge INEQUALITY_OPS with COMPARISON_OPS
1 parent 1e0fe2f commit 2146bdd

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/transforms/filter.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ var axisIds = require('../plots/cartesian/axis_ids');
1515
var autoType = require('../plots/cartesian/axis_autotype');
1616
var setConvert = require('../plots/cartesian/set_convert');
1717

18-
var COMPARISON_OPS = ['=', '!='];
19-
var INEQUALITY_OPS = ['<', '>=', '>', '<='];
18+
var COMPARISON_OPS = ['=', '!=', '<', '>=', '>', '<='];
2019
var INTERVAL_OPS = ['[]', '()', '[)', '(]', '][', ')(', '](', ')['];
2120
var SET_OPS = ['{}', '}{'];
2221

@@ -54,7 +53,6 @@ exports.attributes = {
5453
valType: 'enumerated',
5554
values: []
5655
.concat(COMPARISON_OPS)
57-
.concat(INEQUALITY_OPS)
5856
.concat(INTERVAL_OPS)
5957
.concat(SET_OPS),
6058
dflt: '=',
@@ -94,16 +92,15 @@ exports.attributes = {
9492
'to *target*.',
9593

9694
'When `operation` is set to one of',
97-
'the comparison or (' + COMPARISON_OPS + ')',
98-
'inequality values (' + INEQUALITY_OPS + ')',
95+
'the comparison values (' + COMPARISON_OPS + ')',
9996
'*value* is expected to be a number or a string.',
10097

101-
'When `operation` is set to one of the interval value',
98+
'When `operation` is set to one of the interval values',
10299
'(' + INTERVAL_OPS + ')',
103100
'*value* is expected to be 2-item array where the first item',
104101
'is the lower bound and the second item is the upper bound.',
105102

106-
'When `operation`, is set to one of the set value',
103+
'When `operation`, is set to one of the set values',
107104
'(' + SET_OPS + ')',
108105
'*value* is expected to be an array with as many items as',
109106
'the desired set elements.'
@@ -274,7 +271,7 @@ function getFilterFunc(opts, d2c, targetCalendar) {
274271

275272
var coercedValue;
276273

277-
if(isOperationIn(COMPARISON_OPS) || isOperationIn(INEQUALITY_OPS)) {
274+
if(isOperationIn(COMPARISON_OPS)) {
278275
coercedValue = hasArrayValue ? d2cValue(value[0]) : d2cValue(value);
279276
}
280277
else if(isOperationIn(INTERVAL_OPS)) {

0 commit comments

Comments
 (0)