@@ -14,7 +14,7 @@ import {arrayify, map, yes, maybeIntervalTransform, subarray} from "./options.js
14
14
import { createProjection , getGeometryChannels , hasProjection } from "./projection.js" ;
15
15
import { createScales , createScaleFunctions , autoScaleRange , exposeScales } from "./scales.js" ;
16
16
import { innerDimensions , outerDimensions } from "./scales.js" ;
17
- import { position , registry as scaleRegistry } from "./scales/index.js" ;
17
+ import { position , projection , registry as scaleRegistry } from "./scales/index.js" ;
18
18
import { applyInlineStyles , maybeClassName } from "./style.js" ;
19
19
import { initializer } from "./transforms/basic.js" ;
20
20
import { consumeWarnings , warn } from "./warnings.js" ;
@@ -201,7 +201,7 @@ export function plot(options = {}) {
201
201
// channels as-is rather than creating new scales, and assume that
202
202
// they already have the scale’s transform applied, if any (e.g., when
203
203
// generating ticks for the axis mark).
204
- if ( scale != null && scaleRegistry . get ( scale ) !== position ) {
204
+ if ( scale != null && ! [ position , projection ] . includes ( scaleRegistry . get ( scale ) ) ) {
205
205
applyScaleTransform ( channel , options ) ;
206
206
newByScale . add ( scale ) ;
207
207
}
@@ -502,7 +502,7 @@ function maybeMarkFacet(mark, topFacetState, options) {
502
502
}
503
503
504
504
function derive ( mark , options = { } ) {
505
- return initializer ( { ...options , x : null , y : null } , ( data , facets , channels , scales , dimensions , context ) => {
505
+ return initializer ( { ...options , x : null , y : null } , ( _data , _facets , _channels , scales , dimensions , context ) => {
506
506
return context . getMarkState ( mark ) ;
507
507
} ) ;
508
508
}
0 commit comments