Skip to content

Commit 4dd08d2

Browse files
committed
minimize diff
1 parent bedb6ec commit 4dd08d2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/plot.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -528,17 +528,17 @@ export function plot(options = {}) {
528528

529529
// Initalize the scales and axes.
530530
const scaleDescriptors = Scales(addScaleChannels(channelsByScale, stateByMark), options);
531+
const scales = ScaleFunctions(scaleDescriptors);
531532
const axes = Axes(scaleDescriptors, options);
532533
const dimensions = Dimensions(scaleDescriptors, axes, options);
533534
const context = Context(options);
534535

535536
autoScaleRange(scaleDescriptors, dimensions);
536537
autoAxisTicks(scaleDescriptors, axes);
537538

538-
const scales = ScaleFunctions(scaleDescriptors);
539539
const {fx, fy} = scales;
540-
const fxMargins = fx && {marginRight: 0, marginLeft: 0, width: fx.bandwidth()};
541540
const fyMargins = fy && {marginTop: 0, marginBottom: 0, height: fy.bandwidth()};
541+
const fxMargins = fx && {marginRight: 0, marginLeft: 0, width: fx.bandwidth()};
542542
const subdimensions = {...dimensions, ...fxMargins, ...fyMargins};
543543

544544
// Reinitialize; for deriving channels dependent on other channels.
@@ -614,9 +614,9 @@ export function plot(options = {}) {
614614
if (axisX) svg.appendChild(axisX.render(null, scales, dimensions, context));
615615

616616
// Render (possibly faceted) marks.
617-
if (facets) {
618-
const fxDomain = fx && fx.domain();
617+
if (facets !== undefined) {
619618
const fyDomain = fy && fy.domain();
619+
const fxDomain = fx && fx.domain();
620620
const selection = select(svg);
621621
if (fy && axes.y) {
622622
const axis1 = axes.y,
@@ -683,8 +683,8 @@ export function plot(options = {}) {
683683
);
684684
}
685685

686-
// Render facets in the order of the fx-fy domainwhich 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.
688688
const facetPosition = new Map(facets.map((f, j) => [f, j]));
689689
selection
690690
.selectAll()

0 commit comments

Comments
 (0)