Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color by Column #1

Open
JorgeMiguelGomes opened this issue Apr 26, 2021 · 0 comments
Open

Color by Column #1

JorgeMiguelGomes opened this issue Apr 26, 2021 · 0 comments

Comments

@JorgeMiguelGomes
Copy link
Member

WHAT THE CODE DOES SO FAR

This code will return a plotly graph with a dropdown menu where you can choose different COVID-19 related data (New Cases Total, New Cases Daily, etc)

PROBLEM

Using the dropdown menu returns the correct values but assigns the same color to all of them (blue)

NOT WORKING SOLUTION

Create a dictionary for every column (here just for the first two) and assign a specific color to each

# assign colors to column  using a dictionary
colors = dict('casos_novos_t':'coral',
          'casos_novos_d':'darkviolet')

Use marker_color to force the use of a specific color

However marker_color = colors returns an error

INSIGHT

Without a dropdown menu plotly generates one color for each column, automatically.
Screenshot 2021-04-26 at 11 31 17
Screenshot 2021-04-26 at 11 31 25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant