|
9 | 9 |
|
10 | 10 | 'use strict'; |
11 | 11 |
|
12 | | -var Plotly = require('../../plotly'); |
13 | 12 | var d3 = require('d3'); |
14 | 13 | var isNumeric = require('fast-isnumeric'); |
15 | 14 |
|
| 15 | +var Lib = require('../../lib'); |
| 16 | +var Color = require('../color'); |
| 17 | +var subTypes = require('../../traces/scatter/subtypes'); |
| 18 | + |
| 19 | + |
16 | 20 | var errorBars = module.exports = {}; |
17 | 21 |
|
18 | 22 | errorBars.attributes = require('./attributes'); |
@@ -70,13 +74,13 @@ errorBars.plot = function(gd, plotinfo, cd) { |
70 | 74 | var trace = d[0].trace, |
71 | 75 | xObj = trace.error_x, |
72 | 76 | yObj = trace.error_y, |
73 | | - sparse = Plotly.Scatter.hasMarkers(trace) && |
| 77 | + sparse = subTypes.hasMarkers(trace) && |
74 | 78 | trace.marker.maxdisplayed>0; |
75 | 79 |
|
76 | 80 | if(!yObj.visible && !xObj.visible) return; |
77 | 81 |
|
78 | 82 | d3.select(this).selectAll('g') |
79 | | - .data(Plotly.Lib.identity) |
| 83 | + .data(Lib.identity) |
80 | 84 | .enter().append('g') |
81 | 85 | .each(function(d){ |
82 | 86 | coords = errorcoords(d, xa, ya); |
@@ -121,13 +125,13 @@ errorBars.style = function(gd){ |
121 | 125 |
|
122 | 126 | eb.selectAll('g path.yerror') |
123 | 127 | .style('stroke-width', yObj.thickness+'px') |
124 | | - .call(Plotly.Color.stroke, yObj.color); |
| 128 | + .call(Color.stroke, yObj.color); |
125 | 129 |
|
126 | 130 | if(xObj.copy_ystyle) xObj = yObj; |
127 | 131 |
|
128 | 132 | eb.selectAll('g path.xerror') |
129 | 133 | .style('stroke-width', xObj.thickness+'px') |
130 | | - .call(Plotly.Color.stroke, xObj.color); |
| 134 | + .call(Color.stroke, xObj.color); |
131 | 135 | }); |
132 | 136 | }; |
133 | 137 |
|
|
0 commit comments