@@ -528,17 +528,17 @@ export function plot(options = {}) {
528
528
529
529
// Initalize the scales and axes.
530
530
const scaleDescriptors = Scales ( addScaleChannels ( channelsByScale , stateByMark ) , options ) ;
531
+ const scales = ScaleFunctions ( scaleDescriptors ) ;
531
532
const axes = Axes ( scaleDescriptors , options ) ;
532
533
const dimensions = Dimensions ( scaleDescriptors , axes , options ) ;
533
534
const context = Context ( options ) ;
534
535
535
536
autoScaleRange ( scaleDescriptors , dimensions ) ;
536
537
autoAxisTicks ( scaleDescriptors , axes ) ;
537
538
538
- const scales = ScaleFunctions ( scaleDescriptors ) ;
539
539
const { fx, fy} = scales ;
540
- const fxMargins = fx && { marginRight : 0 , marginLeft : 0 , width : fx . bandwidth ( ) } ;
541
540
const fyMargins = fy && { marginTop : 0 , marginBottom : 0 , height : fy . bandwidth ( ) } ;
541
+ const fxMargins = fx && { marginRight : 0 , marginLeft : 0 , width : fx . bandwidth ( ) } ;
542
542
const subdimensions = { ...dimensions , ...fxMargins , ...fyMargins } ;
543
543
544
544
// Reinitialize; for deriving channels dependent on other channels.
@@ -614,9 +614,9 @@ export function plot(options = {}) {
614
614
if ( axisX ) svg . appendChild ( axisX . render ( null , scales , dimensions , context ) ) ;
615
615
616
616
// Render (possibly faceted) marks.
617
- if ( facets ) {
618
- const fxDomain = fx && fx . domain ( ) ;
617
+ if ( facets !== undefined ) {
619
618
const fyDomain = fy && fy . domain ( ) ;
619
+ const fxDomain = fx && fx . domain ( ) ;
620
620
const selection = select ( svg ) ;
621
621
if ( fy && axes . y ) {
622
622
const axis1 = axes . y ,
@@ -683,8 +683,8 @@ export function plot(options = {}) {
683
683
) ;
684
684
}
685
685
686
- // Render facets in the order of the fx-fy domain— which might not be the
687
- // ordering used to build the nested index initially, see domainChannel
686
+ // Render facets in the order of the fx-fy domain, which might not be the
687
+ // ordering used to build the nested index initially; see domainChannel.
688
688
const facetPosition = new Map ( facets . map ( ( f , j ) => [ f , j ] ) ) ;
689
689
selection
690
690
. selectAll ( )
0 commit comments