@@ -115,18 +115,15 @@ function unwrap(d) {
115
115
}
116
116
117
117
function model ( layout , d , i ) {
118
- var trace = unwrap ( d ) . trace ,
118
+ var cd0 = unwrap ( d ) ,
119
+ trace = cd0 . trace ,
120
+ lineColor = cd0 . lineColor ,
121
+ cscale = cd0 . cscale ,
119
122
line = trace . line ,
120
123
domain = trace . domain ,
121
124
dimensions = trace . dimensions ,
122
125
width = layout . width ;
123
126
124
- var cs = ! ! trace . line . colorscale && Lib . isArray ( trace . line . color ) ;
125
- var lineColor = cs ?
126
- trace . line . color :
127
- Array . apply ( 0 , Array ( trace . dimensions . reduce ( function ( p , n ) { return Math . max ( p , n . values . length ) ; } , 0 ) ) ) . map ( function ( ) { return 0.5 ; } ) ;
128
- var lineColorScale = cs ? trace . line . colorscale : [ [ 0 , trace . line . color ] , [ 1 , trace . line . color ] ] ;
129
-
130
127
var lines = Lib . extendDeep ( { } , line , {
131
128
color : lineColor . map ( domainToUnitScale ( { values : lineColor , range : [ line . cmin , line . cmax ] } ) ) ,
132
129
blockLineCount : c . blockLineCount ,
@@ -145,7 +142,7 @@ function model(layout, d, i) {
145
142
colCount : dimensions . filter ( visible ) . length ,
146
143
dimensions : dimensions ,
147
144
tickDistance : c . tickDistance ,
148
- unitToColor : unitToColorScale ( lineColorScale ) ,
145
+ unitToColor : unitToColorScale ( cscale ) ,
149
146
lines : lines ,
150
147
translateX : domain . x [ 0 ] * width ,
151
148
translateY : layout . height - domain . y [ 1 ] * layout . height ,
0 commit comments