File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -184,10 +184,10 @@ export function createScale<T extends ScaleOptions>(
184
184
// we're deliberately checking for !== undefined and not for != null
185
185
// since the explicit sort transforms like shuffle will set the
186
186
// sort channel to null to we know that there's an explicit order
187
- if ( name === 'y' ) console . log ( mark . type , mark . options [ IS_SORTED ] ) ;
188
- if ( mark . options [ IS_SORTED ] != null ) {
187
+ if ( ( name === 'x' || name === 'y' ) && mark . options [ IS_SORTED ] != undefined ) {
189
188
sortOrdinalDomain = false ;
190
189
}
190
+
191
191
for ( const channel of mark . channels ) {
192
192
// channelOptions can be passed as prop, but most often users will just
193
193
// pass the channel accessor or constant value, so we may need to wrap
@@ -282,6 +282,10 @@ export function createScale<T extends ScaleOptions>(
282
282
}
283
283
}
284
284
285
+ if ( ( name === 'x' || name === 'y' ) && scaleOptions . sort ) {
286
+ sortOrdinalDomain = true ;
287
+ }
288
+
285
289
// construct domain from data values
286
290
const valueArr = [ ...dataValues . values ( ) , ...( scaleOptions . domain || [ ] ) ] . filter (
287
291
( d ) => d != null
You can’t perform that action at this time.
0 commit comments