File tree Expand file tree Collapse file tree 3 files changed +29
-17
lines changed Expand file tree Collapse file tree 3 files changed +29
-17
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
+ 'use strict' ;
10
+
11
+ var arraysToCalcdata = require ( '../scatter/arrays_to_calcdata' ) ;
12
+ var calcMarkerColorscale = require ( '../scatter/marker_colorscale_calc' ) ;
13
+
14
+
15
+ /**
16
+ * This is a kludge to put the array attributes into
17
+ * calcdata the way Scatter.plot does, so that legends and
18
+ * popovers know what to do with them.
19
+ */
20
+ module . exports = function calc ( gd , trace ) {
21
+ var cd = [ { x : false , y : false , trace : trace , t : { } } ] ;
22
+
23
+ arraysToCalcdata ( cd ) ;
24
+ calcMarkerColorscale ( trace ) ;
25
+
26
+ return cd ;
27
+ } ;
Original file line number Diff line number Diff line change 8
8
9
9
'use strict' ;
10
10
11
- var Scatter = require ( '../scatter' ) ;
12
-
13
11
var Scatter3D = { } ;
14
12
15
13
Scatter3D . plot = require ( './convert' ) ;
16
14
Scatter3D . attributes = require ( './attributes' ) ;
17
15
Scatter3D . markerSymbols = require ( '../../constants/gl_markers.json' ) ;
18
16
Scatter3D . supplyDefaults = require ( './defaults' ) ;
19
17
Scatter3D . colorbar = require ( '../scatter/colorbar' ) ;
20
-
21
- Scatter3D . calc = function ( gd , trace ) {
22
- // this is a kludge to put the array attributes into
23
- // calcdata the way Scatter.plot does, so that legends and
24
- // popovers know what to do with them.
25
- var cd = [ { x : false , y : false , trace : trace , t : { } } ] ;
26
- Scatter . arraysToCalcdata ( cd ) ;
27
-
28
- Scatter . calcMarkerColorscales ( trace ) ;
29
-
30
- return cd ;
31
- } ;
18
+ Scatter3D . calc = require ( './calc' ) ;
32
19
33
20
Scatter3D . moduleType = 'trace' ;
34
21
Scatter3D . name = 'scatter3d' ;
Original file line number Diff line number Diff line change 8
8
9
9
'use strict' ;
10
10
11
- var Scatter3D = require ( '../scatter3d' ) ;
12
-
13
11
var ScatterGl = { } ;
14
12
15
13
ScatterGl . attributes = require ( './attributes' ) ;
16
14
ScatterGl . supplyDefaults = require ( './defaults' ) ;
17
15
ScatterGl . colorbar = require ( '../scatter/colorbar' ) ;
18
16
19
17
// reuse the Scatter3D 'dummy' calc step so that legends know what to do
20
- ScatterGl . calc = Scatter3D . calc ;
18
+ ScatterGl . calc = require ( '../scatter3d/ calc' ) ;
21
19
ScatterGl . plot = require ( './convert' ) ;
22
20
23
21
ScatterGl . moduleType = 'trace' ;
You can’t perform that action at this time.
0 commit comments