@@ -107,6 +107,7 @@ var proto = LineWithMarkers.prototype;
107107
108108proto . handlePick = function ( pickResult ) {
109109 var index = pickResult . pointId ;
110+
110111 if ( pickResult . object !== this . line || this . connectgaps ) {
111112 index = this . idToIndex [ pickResult . pointId ] ;
112113 }
@@ -136,19 +137,20 @@ proto.isFancy = function(options) {
136137
137138 if ( ! options . x || ! options . y ) return true ;
138139
139- var marker = options . marker || { } ;
140- if ( Array . isArray ( marker . symbol ) ||
141- marker . symbol !== 'circle' ||
142- Array . isArray ( marker . size ) ||
143- Array . isArray ( marker . line . width ) ||
144- Array . isArray ( marker . opacity )
145- ) return true ;
146-
147- var markerColor = marker . color ;
148- if ( Array . isArray ( markerColor ) ) return true ;
140+ if ( this . hasMarkers ) {
141+ var marker = options . marker || { } ;
142+
143+ if ( Array . isArray ( marker . symbol ) ||
144+ marker . symbol !== 'circle' ||
145+ Array . isArray ( marker . size ) ||
146+ Array . isArray ( marker . color ) ||
147+ Array . isArray ( marker . line . width ) ||
148+ Array . isArray ( marker . line . color ) ||
149+ Array . isArray ( marker . opacity )
150+ ) return true ;
151+ }
149152
150- var lineColor = Array . isArray ( marker . line . color ) ;
151- if ( Array . isArray ( lineColor ) ) return true ;
153+ if ( this . hasLines && ! this . connectgaps ) return true ;
152154
153155 if ( this . hasErrorX ) return true ;
154156 if ( this . hasErrorY ) return true ;
@@ -471,8 +473,10 @@ proto.updateFancy = function(options) {
471473
472474proto . updateLines = function ( options , positions ) {
473475 var i ;
476+
474477 if ( this . hasLines ) {
475478 var linePositions = positions ;
479+
476480 if ( ! options . connectgaps ) {
477481 var p = 0 ;
478482 var x = this . xData ;
@@ -484,12 +488,11 @@ proto.updateLines = function(options, positions) {
484488 linePositions [ p ++ ] = y [ i ] ;
485489 }
486490 }
487- this . lineOptions . positions = linePositions ;
488491
489- var lineColor = str2RGBArray ( options . line . color ) ;
490- if ( this . hasMarkers ) lineColor [ 3 ] *= options . marker . opacity ;
492+ this . lineOptions . positions = linePositions ;
491493
492- var lineWidth = Math . round ( 0.5 * this . lineOptions . width ) ,
494+ var lineColor = convertColor ( options . line . color , options . opacity , 1 ) ,
495+ lineWidth = Math . round ( 0.5 * this . lineOptions . width ) ,
493496 dashes = ( DASHES [ options . line . dash ] || [ 1 ] ) . slice ( ) ;
494497
495498 for ( i = 0 ; i < dashes . length ; ++ i ) dashes [ i ] *= lineWidth ;
0 commit comments