Skip to content

Commit 14fd327

Browse files
committedOct 24, 2016
filter: swap Plots.supplyDefaults call for more granular approach
- for the Array.isArray(target) case
1 parent b7c2b17 commit 14fd327

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed
 

Diff for: ‎src/transforms/filter.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
'use strict';
1010

1111
var Lib = require('../lib');
12-
var Plots = require('../plots/plots');
1312
var axisIds = require('../plots/cartesian/axis_ids');
13+
var autoType = require('../plots/cartesian/axis_autotype');
14+
var setConvert = require('../plots/cartesian/set_convert');
1415

1516
var INEQUALITY_OPS = ['=', '<', '>=', '>', '<='];
1617
var INTERVAL_OPS = ['[]', '()', '[)', '(]', '][', ')(', '](', ')['];
@@ -179,13 +180,11 @@ function getDataToCoordFunc(gd, trace, target) {
179180
// and call supplyDefaults to the data type and
180181
// setup the data-to-calc method.
181182
if(Array.isArray(target)) {
182-
var mockGd = {
183-
data: [{ x: target }],
184-
layout: {}
183+
ax = {
184+
type: autoType(target),
185+
_categories: []
185186
};
186-
187-
Plots.supplyDefaults(mockGd);
188-
ax = mockGd._fullLayout.xaxis;
187+
setConvert(ax);
189188
}
190189
else {
191190
ax = axisIds.getFromTrace(gd, trace, target);

0 commit comments

Comments
 (0)
Please sign in to comment.