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 88
99'use strict' ;
1010
11- var Scatter = require ( '../scatter' ) ;
12-
1311var Scatter3D = { } ;
1412
1513Scatter3D . plot = require ( './convert' ) ;
1614Scatter3D . attributes = require ( './attributes' ) ;
1715Scatter3D . markerSymbols = require ( '../../constants/gl_markers.json' ) ;
1816Scatter3D . supplyDefaults = require ( './defaults' ) ;
1917Scatter3D . 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' ) ;
3219
3320Scatter3D . moduleType = 'trace' ;
3421Scatter3D . name = 'scatter3d' ;
Original file line number Diff line number Diff line change 88
99'use strict' ;
1010
11- var Scatter3D = require ( '../scatter3d' ) ;
12-
1311var ScatterGl = { } ;
1412
1513ScatterGl . attributes = require ( './attributes' ) ;
1614ScatterGl . supplyDefaults = require ( './defaults' ) ;
1715ScatterGl . colorbar = require ( '../scatter/colorbar' ) ;
1816
1917// reuse the Scatter3D 'dummy' calc step so that legends know what to do
20- ScatterGl . calc = Scatter3D . calc ;
18+ ScatterGl . calc = require ( '../scatter3d/ calc' ) ;
2119ScatterGl . plot = require ( './convert' ) ;
2220
2321ScatterGl . moduleType = 'trace' ;
You can’t perform that action at this time.
0 commit comments