Skip to content

Scale sorting #26

@kalealex

Description

@kalealex

Ziyang did and amazing job adding the sorting indices to guarantee that ordinal variables (e.g., month, day) always appear in a consistent order. We just need a couple other fixes related to this functionality.

Todo

  • Please reverse the default sort order for factors on the y-axis. It's correct for model checks, but without model checks the tool defaults to the opposite sort order. This means that adding model checks flips the order of the y-axis for ordinal variables, which could be jarring for users.
  • There should be a sort index for modelcheck_group so that model groups are mapped to colors in the order they are applied by the user: ["data", , , ...]. This can be derived from the models object in the state of the tool.

There's also the question of whether each model should get a consistent color from the time the user adds it to the time they remove it. The difficulty with this is that if I add three models and remove the first one, the sort index approach would reassign the colors of the second and third models added. I'm not sure this is a big enough deal to fuss with custom color scales in Vega.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions