Skip to content

Commit

Permalink
fix: mark sequential scales as deprecated (#9212)
Browse files Browse the repository at this point in the history
close #9017 

Update in the continuous scale section,
let me know if need to add some warning in the script.

![image](https://github.com/vega/vega-lite/assets/75072960/368afcd8-f804-4e99-b2fb-6a94aaa8619e)

---------

Co-authored-by: GitHub Actions Bot <vega-actions-bot@users.noreply.github.com>
  • Loading branch information
ChiaLingWeng and GitHub Actions Bot committed Jan 21, 2024
1 parent 6dd84ae commit 93a44db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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

0 comments on commit 93a44db

Please sign in to comment.