File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright 2012-2016, Plotly, Inc.
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+
10
+ 'use strict' ;
11
+
12
+ var d3 = require ( 'd3' ) ;
13
+
14
+ var Color = require ( '../color' ) ;
15
+
16
+
17
+ module . exports = function style ( traces ) {
18
+ traces . each ( function ( d ) {
19
+ var trace = d [ 0 ] . trace ,
20
+ yObj = trace . error_y || { } ,
21
+ xObj = trace . error_x || { } ;
22
+
23
+ var s = d3 . select ( this ) ;
24
+
25
+ s . selectAll ( 'path.yerror' )
26
+ . style ( 'stroke-width' , yObj . thickness + 'px' )
27
+ . call ( Color . stroke , yObj . color ) ;
28
+
29
+ if ( xObj . copy_ystyle ) xObj = yObj ;
30
+
31
+ s . selectAll ( 'path.xerror' )
32
+ . style ( 'stroke-width' , xObj . thickness + 'px' )
33
+ . call ( Color . stroke , xObj . color ) ;
34
+ } ) ;
35
+ } ;
You can’t perform that action at this time.
0 commit comments