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

Feature: Country colour coding according to filter #6731

Closed
droberts-ctrlo opened this issue Sep 21, 2023 · 3 comments
Closed

Feature: Country colour coding according to filter #6731

droberts-ctrlo opened this issue Sep 21, 2023 · 3 comments
Labels
feature something new

Comments

@droberts-ctrlo
Copy link

We have a specific use-case we are using plotly.js for within the company I work for; we sometimes need to colour-code countries according to specific criterion within a geo map - for example, we may need all predominantly English speaking countries to be Blue, all predominantly French to be green, predominantly Spanish to be yellow, etc.

We have implemented this for our use-case, and wonder if it would be useful for the community; should it be as such, we can open a pull request of our code, and work from there.

@28raining
Copy link
Contributor

Have you tried Choropleth maps?
https://plotly.com/javascript/choropleth-maps/

@alexcjohnson
Copy link
Collaborator

Thanks @droberts-ctrlo - I'm curious to hear about what you implemented. From the sound of it I'm guessing you already have a choropleth, and I think what you're adding is a flavor of categorical colorscales #1747. The alternative for this kind of data is to break it into different traces, one per category, and give each trace a fixed color. This is what plotly.express does from the Python side, but we don't have a clean way to construct traces like this purely in JS.

@mjainGH mjainGH added the feature something new label Oct 31, 2023
@gvwilson
Copy link
Contributor

Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson

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

No branches or pull requests

5 participants