Skip to content

Commit 70c1887

Browse files
committed
move errorbar style step to Bar.style and Scatter.style
1 parent ba21336 commit 70c1887

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

src/plots/plots.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -805,10 +805,11 @@ plots.purge = function(gd) {
805805
};
806806

807807
plots.style = function(gd) {
808-
var modulesWithErrorBars = gd._modules.concat(Plotly.ErrorBars);
808+
var _modules = gd._modules;
809+
810+
for(var i = 0; i < _modules.length; i++) {
811+
var _module = _modules[i];
809812

810-
for(var i = 0; i < modulesWithErrorBars.length; i++) {
811-
var _module = modulesWithErrorBars[i];
812813
if(_module.style) _module.style(gd);
813814
}
814815
};

src/traces/bar/style.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ var d3 = require('d3');
1313

1414
var Color = require('../../components/color');
1515
var Drawing = require('../../components/drawing');
16+
var ErrorBars = require('../../components/errorbars');
1617

1718

1819
module.exports = function style(gd) {
@@ -71,4 +72,6 @@ module.exports = function style(gd) {
7172
// d3.select(this).selectAll('text')
7273
// .call(Plotly.Drawing.textPointStyle,d.t||d[0].t);
7374
});
75+
76+
s.call(ErrorBars.style);
7477
};

src/traces/scatter/style.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
var d3 = require('d3');
1313

1414
var Drawing = require('../../components/drawing');
15+
var ErrorBars = require('../../components/errorbars');
1516

1617

1718
module.exports = function style(gd) {
@@ -34,4 +35,6 @@ module.exports = function style(gd) {
3435

3536
s.selectAll('g.trace path.js-fill')
3637
.call(Drawing.fillGroupStyle);
38+
39+
s.call(ErrorBars.style);
3740
};

0 commit comments

Comments
 (0)