Skip to content

Allow mark channels to specify a default scale type #533

Closed

Description

@mbostock

Currently mark channels can specify a required scale type, such as barY’s x channel requiring a band scale; but what if mark channels could specify a default scale type that overrides data-based type inference? For example, the line and area marks are typically used with quantitative dimensions (and more specifically, x is often temporal). While it’s possible to use these marks with ordinal data, most of the time it’s a mistake caused by lack of typing in CSV. If these marks could default to quantitative/temporal instead of default to the data’s type, it might avoid a common mistake. Related #532.

Activity

  1. added
    enhancement
    question
    on Sep 5, 2021
  2. mbostock commented on Feb 26, 2022

    @mbostock
    MemberAuthor

    I think this is sufficiently covered by the new warning system, though we could introduce a warning when a line or area is used with ordinal data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementquestion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions