Skip to content

How to create interval legend on choropleth graph? #2857

@BS-98

Description

@BS-98

Hi,

is it possible to create a choropleth with intervals visualization? I've searched that is possible but only working with USA area but I have another region.

I have something like this:
plot1

But I want to have a legend like this in red rectangle:
plot2

Code for my graph is:

fig = px.choropleth(dff,
                        locations="Województwo",
                        geojson=pl_json,
                        color=color,
                        color_continuous_scale=px.colors.sequential.Blues,
                        scope="europe")
    
    fig.update_geos(fitbounds="locations", visible=False)
    fig.update_layout(height=600)

I would be grateful for any help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions