Skip to content

Support different colors for negative values #28

@mrjones-plip

Description

@mrjones-plip

I have a map that I'd like to show negative colors in red. I tried declaring the min and max like this:

.map({
    countries: {
        attr: { // todo min, max, empty, legend and rollup don't work
            fill: {
                min: "red",
                max: "blue",
                empty: "white",
            },
        },

But this doesn't do it correctly. If you have a bunch of positive values and only one negative value, D3 scales the colors accordingly so a lot of positive values are in red.

I'm looking for a way to have positive values in one color scheme and negative values be in a different color scheme.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions