Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eba1b4a

Browse filesBrowse files
author
Jon M. Mease
committed
Cleanup line defaults logic
1 parent 2100d96 commit eba1b4a
Copy full SHA for eba1b4a

File tree

Expand file treeCollapse file tree

4 files changed

+3
-31
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+3
-31
lines changed

‎src/traces/parcats/calc.js

Copy file name to clipboardExpand all lines: src/traces/parcats/calc.js
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
var wrap = require('../../lib/gup').wrap;
1414
var hasColorscale = require('../../components/colorscale/has_colorscale');
1515
var colorscaleCalc = require('../../components/colorscale/calc');
16-
var parcatConstants = require('./constants');
1716
var filterUnique = require('../../lib/filter_unique.js');
1817
var Drawing = require('../../components/drawing');
1918
var Lib = require('../../lib');
@@ -101,9 +100,7 @@ module.exports = function calc(gd, trace) {
101100
// Build color generation function
102101
function getMarkerColorInfo(index) {
103102
var value;
104-
if(!line) {
105-
value = parcatConstants.defaultColor;
106-
} else if(Lib.isArrayOrTypedArray(line.color)) {
103+
if(Lib.isArrayOrTypedArray(line.color)) {
107104
value = line.color[index % line.color.length];
108105
} else {
109106
value = line.color;

‎src/traces/parcats/constants.js

Copy file name to clipboardExpand all lines: src/traces/parcats/constants.js
-17Lines changed: 0 additions & 17 deletions
This file was deleted.

‎src/traces/parcats/defaults.js

Copy file name to clipboardExpand all lines: src/traces/parcats/defaults.js
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ var mergeLength = require('../parcoords/merge_length');
1919

2020
function handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce) {
2121

22-
if(traceIn.line) {
23-
coerce('line.shape');
24-
}
25-
22+
coerce('line.shape');
2623
var lineColor = coerce('line.color', defaultColor);
2724
if(hasColorscale(traceIn, 'line') && Lib.isArrayOrTypedArray(lineColor)) {
2825
if(lineColor.length) {

‎src/traces/parcats/parcats.js

Copy file name to clipboardExpand all lines: src/traces/parcats/parcats.js
+1-6Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,12 +1465,7 @@ function createParcatsViewModel(graphDiv, layout, wrappedParcatsModel) {
14651465

14661466
// Handle path shape
14671467
// -----------------
1468-
var pathShape;
1469-
if(trace.line && trace.line.shape) {
1470-
pathShape = trace.line.shape;
1471-
} else {
1472-
pathShape = 'linear';
1473-
}
1468+
var pathShape = trace.line.shape;
14741469

14751470
// Handle hover info
14761471
// -----------------

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.