Skip to content

sort by channel not used to visualize? #867

@enjalot

Description

@enjalot

I have a dataset sorted by a column, lets say rate. I then create a stacked bar chart using a different column, lets say value.
I want a stacked bar chart on value but sorted by rate. Even though my data is already sorted by rate, when i do the following it orders the y domain alphabetically:

Plot.barX(data, { x: "value", y: "name", fill: "type" })

if I try to use sort: { y: "x", reverse: true, limit: 20 } I can't figure out how to get it to sort by my rate column instead.

I'm able to do a work around by explicitly setting the y domain to the sorted order of names I want, but it feels like i might be missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions