Skip to content

Using the mark sort option excludes other marks' values from sorted domain #2440

Description

@mootari

I'm filing this bug with the caveat that it might be expected behavior.

Given two marks that render different sets of values, if the first mark defines a sort option then the sorted domain won't include the second mark's channel values.

The following example:

Plot.plot({
  marks: [
    Plot.dot([{k: "b", v: 1}, {k: "a", v: 2}], {x: "v", y: "k", sort: {y: "x"}}),
    Plot.dot([{k: "b", v: 1}, {k: "c", v: 3}], {x: "v", y: "k"}),
  ],
})

extends x to include {k: "c", v: 3} but does not extend y:

Image

Activity

  1. mbostock commented on Jun 24, 2026

    @mbostock
    Member

    WAI

  2. mootari commented on Jun 24, 2026

    @mootari
    ContributorAuthor

    Where is this behavior explained?

  3. locked and limited conversation to collaborators on Jun 24, 2026
  4. converted this issue into a discussion #2442 on Jun 24, 2026
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

    bugSomething isn’t working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions