We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64344a2 commit c51d719Copy full SHA for c51d719
src/traces/scatter/calc.js
@@ -15,7 +15,7 @@ var Axes = require('../../plots/cartesian/axes');
15
var Lib = require('../../lib');
16
17
var subTypes = require('./subtypes');
18
-var calcMarkerColorscale = require('./marker_colorscale_calc');
+var calcColorscale = require('./colorscale_calc');
19
20
21
module.exports = function calc(gd, trace) {
@@ -73,7 +73,7 @@ module.exports = function calc(gd, trace) {
73
s.map(markerTrans) : markerTrans(s);
74
}
75
76
- calcMarkerColorscale(trace);
+ calcColorscale(trace);
77
78
// TODO: text size
79
src/traces/scatter/marker_colorscale_calc.js renamed to src/traces/scatter/colorscale_calc.js
@@ -17,16 +17,21 @@ var subTypes = require('./subtypes');
// common to 'scatter', 'scatter3d' and 'scattergeo'
module.exports = function calcMarkerColorscale(trace) {
- if(!subTypes.hasMarkers(trace)) return;
-
22
- var marker = trace.marker;
23
24
// auto-z and autocolorscale if applicable
25
- if(hasColorscale(trace, 'marker')) {
26
- calcColorscale(trace, marker.color, 'marker', 'c');
+
+ if(subTypes.hasLines(trace) && hasColorscale(trace, 'line')) {
+ calcColorscale(trace, trace.line.color, 'line', 'c');
27
28
29
- if(hasColorscale(trace, 'marker.line')) {
30
- calcColorscale(trace, marker.line.color, 'marker.line', 'c');
+ if(subTypes.hasMarkers(trace)) {
+ if(hasColorscale(trace, 'marker')) {
+ calcColorscale(trace, trace.marker.color, 'marker', 'c');
31
+ }
32
33
+ if(hasColorscale(trace, 'marker.line')) {
34
+ calcColorscale(trace, trace.marker.line.color, 'marker.line', 'c');
35
36
37
};
src/traces/scatter3d/calc.js
@@ -9,7 +9,7 @@
9
'use strict';
10
11
var arraysToCalcdata = require('../scatter/arrays_to_calcdata');
12
-var calcMarkerColorscale = require('../scatter/marker_colorscale_calc');
+var calcColorscales = require('../scatter/colorscale_calc');
13
14
/**
@@ -21,7 +21,7 @@ module.exports = function calc(gd, trace) {
var cd = [{x: false, y: false, trace: trace, t: {}}];
arraysToCalcdata(cd);
+ calcColorscales(trace);
return cd;
src/traces/scattergeo/calc.js
@@ -9,13 +9,13 @@
+var calcColorscale = require('../scatter/colorscale_calc');
src/traces/scattermapbox/calc.js
@@ -15,7 +15,7 @@ var Lib = require('../../lib');
var hasColorscale = require('../../components/colorscale/has_colorscale');
var makeColorScaleFn = require('../../components/colorscale/make_scale_function');
var subtypes = require('../scatter/subtypes');
+var calcMarkerColorscale = require('../scatter/colorscale_calc');
var makeBubbleSizeFn = require('../scatter/make_bubble_size_func');
src/traces/scatterternary/calc.js
var subTypes = require('../scatter/subtypes');
var dataArrays = ['a', 'b', 'c'];
var arraysToFill = {a: ['b', 'c'], b: ['a', 'c'], c: ['a', 'b']};
@@ -88,7 +88,7 @@ module.exports = function calc(gd, trace) {
88
89
90
91
92
93
// this has migrated up from arraysToCalcdata as we have a reference to 's' here
94
if(typeof s !== undefined) Lib.mergeArray(s, cd, 'ms');
0 commit comments