@ -99,14 +99,18 @@ nv.models.lineWithFocusChart = function() {
. height ( availableHeight )
. color ( data . map ( function ( d , i ) {
return d . color || color [ i % color . length ] ;
} ) . filter ( function ( d , i ) { return ! data [ i ] . disabled } ) ) ;
} ) . filter ( function ( d , i ) {
return ! data [ i ] . disabled ;
} ) ) ;
lines2
. width ( availableWidth )
. height ( availableHeight2 )
. color ( data . map ( function ( d , i ) {
return d . color || color [ i % color . length ] ;
} ) . filter ( function ( d , i ) { return ! data [ i ] . disabled } ) ) ;
} ) . filter ( function ( d , i ) {
return ! data [ i ] . disabled ;
} ) ) ;
g . attr ( 'transform' , 'translate(' + margin . left + ',' + margin . top + ')' ) ;
@ -285,7 +289,25 @@ nv.models.lineWithFocusChart = function() {
chart . xAxis = xAxis ;
chart . yAxis = yAxis ;
d3 . rebind ( chart , lines , 'x' , 'y' , 'size' , 'xDomain' , 'yDomain' , 'forceX' , 'forceY' , 'interactive' , 'clipEdge' , 'clipVoronoi' , 'id' ) ;
d3 . rebind ( chart , lines , 'size' , 'xDomain' , 'yDomain' , 'forceX' , 'forceY' , 'interactive' , 'clipEdge' , 'clipVoronoi' , 'id' ) ;
chart . x = function ( _ ) {
if ( ! arguments . length ) return lines . x ;
lines . x ( _ ) ;
lines2 . x ( _ ) ;
return chart ;
} ;
chart . y = function ( _ ) {
if ( ! arguments . length ) return lines . y ;
lines . y ( _ ) ;
lines2 . y ( _ ) ;
return chart ;
} ;
// TODO: do the other d3.rebind() items for lines->chart like .x() and .y() above:
// if you don't, then the bottom section (lines2) won't see the user changes
// going through these calls.
chart . margin = function ( _ ) {