Skip to content

Support gradientLength for quantile and quantize color scales #9399

@hydrosquall

Description

@hydrosquall

Motivation

For continuous (linear) scales on a color encoding, the gradientLength config can be used to control legend length.

Standard With custom config
image image

Unfortunately, this property has no effect when using discrete color scales, like quantile or quantize . As far as I could tell, the symbol config options don't control height either.

This can lead to legends that are much taller than their graph (see below: the gradientLength param is set, but it appears to have no effect.)

Quantize Quantile
image image

Proposed solution

  • Add at least 1 configuration option for discrete color scales, perhaps setting the overall legend height (since the quantile mode won't have even tick sizes), in the direction of discreteColorLegendLength .
  • If this property is added for Vega first, it will have to be propagated up to Vega-Lite separately.

Related PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions