@@ -373,9 +373,14 @@ drawing.singlePointStyle = function(d, sel, trace, fns, gd) {
373373 lineColor = markerLine . outliercolor ;
374374 fillColor = marker . outliercolor ;
375375 } else {
376- lineWidth = ( d . mlw + 1 || markerLine . width + 1 ||
376+ var markerLineWidth = ( markerLine || { } ) . width ;
377+
378+ lineWidth = (
379+ d . mlw + 1 ||
380+ markerLineWidth + 1 ||
377381 // TODO: we need the latter for legends... can we get rid of it?
378- ( d . trace ? d . trace . marker . line . width : 0 ) + 1 ) - 1 ;
382+ ( d . trace ? ( d . trace . marker . line || { } ) . width : 0 ) + 1
383+ ) - 1 || 0 ;
379384
380385 if ( 'mlc' in d ) lineColor = d . mlcc = fns . lineScale ( d . mlc ) ;
381386 // weird case: array wasn't long enough to apply to every point
@@ -591,16 +596,19 @@ drawing.selectedPointStyle = function(s, trace) {
591596} ;
592597
593598drawing . tryColorscale = function ( marker , prefix ) {
594- var cont = prefix ? Lib . nestedProperty ( marker , prefix ) . get ( ) : marker ,
595- scl = cont . colorscale ,
596- colorArray = cont . color ;
597-
598- if ( scl && Lib . isArrayOrTypedArray ( colorArray ) ) {
599- return Colorscale . makeColorScaleFunc (
600- Colorscale . extractScale ( scl , cont . cmin , cont . cmax )
601- ) ;
599+ var cont = prefix ? Lib . nestedProperty ( marker , prefix ) . get ( ) : marker ;
600+
601+ if ( cont ) {
602+ var scl = cont . colorscale ;
603+ var colorArray = cont . color ;
604+
605+ if ( scl && Lib . isArrayOrTypedArray ( colorArray ) ) {
606+ return Colorscale . makeColorScaleFunc (
607+ Colorscale . extractScale ( scl , cont . cmin , cont . cmax )
608+ ) ;
609+ }
602610 }
603- else return Lib . identity ;
611+ return Lib . identity ;
604612} ;
605613
606614var TEXTOFFSETSIGN = { start : 1 , end : - 1 , middle : 0 , bottom : 1 , top : - 1 } ;
0 commit comments