Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: mark sequential scales as deprecated #9212

Merged
merged 5 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/compile/selection/scales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ const scaleBindings: SelectionCompiler<'interval'> = {
const scale = model.getScaleComponent(channel);
const scaleType = scale ? scale.get('type') : undefined;

if (scaleType == 'sequential') {
log.warn(log.message.SEQUENTIAL_SCALE_DEPRECATED);
}

if (!scale || !hasContinuousDomain(scaleType)) {
log.warn(log.message.SCALE_BINDINGS_CONTINUOUS);
continue;
Expand Down
3 changes: 3 additions & 0 deletions src/log/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ export function selectionNotFound(name: string) {
export const SCALE_BINDINGS_CONTINUOUS =
'Scale bindings are currently only supported for scales with unbinned, continuous domains.';

export const SEQUENTIAL_SCALE_DEPRECATED =
'Sequntial scales are deprecated. The available quantitative scale type values are linear, log, pow, sqrt, symlog, time and utc';

export const LEGEND_BINDINGS_MUST_HAVE_PROJECTION =
'Legend bindings are only supported for selections over an individual field or encoding channel.';
export function cannotLookupVariableParameter(name: string) {
Expand Down