Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Choropleth background color

$
0
0

Hello,

I have searched around the internet for a few hours now and can’t find the answer to this.

So I have this graph here:

You can see that there is a white square background even though I have set

        plot_bgcolor="#323130",
        paper_bgcolor="#323130",

in the layout.

Here is the full code

    fig = go.Figure(data=go.Choropleth(
        locations=df['state'],
        z = df['happiness'], 
        locationmode = 'USA-states',
        colorscale = colorscale,
        colorbar_title = "Sentiment",
        text = df['text'],
        hoverinfosrc='skip'

                        )
    )

    fig.update_layout(
        geo_scope='usa',
        plot_bgcolor="#323130",
        paper_bgcolor="#323130",
        margin=go.layout.Margin(l=0, r=35, t=0, b=0),
        font=dict(color="white"),
    )

Also as a side question, is there an option I can use to tweak the border color between states? it’s currently dark gray but I would prefer transparent lines.

Thank you!

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles