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

WorldMap coloring makes countries invisible #1497

Closed
mwullink opened this issue Nov 1, 2016 · 6 comments
Closed

WorldMap coloring makes countries invisible #1497

mwullink opened this issue Nov 1, 2016 · 6 comments

Comments

@mwullink
Copy link

mwullink commented Nov 1, 2016

Make sure these boxes are checked before submitting your issue - thank you!

  • [*] I have checked the caravel logs for python stacktraces and included it here as text if any
  • [*] I have reproduced the issue with at least the latest released version of caravel
  • [*] I have checked the issue tracker for the same issue and I haven't found one similar

Caravel version

0.11.0

Expected results

World map with all the countries visible

Actual results

When 1 country has a high count value it gets a very dark color, the countries with a low count value are rendered white and they not visible anymore.

Steps to reproduce

Create set of countries with 1 country having a high count and the others with very low count. only the country with the high count and the countries without counts are visible.

@Igosuki
Copy link

Igosuki commented Jan 26, 2017

Most likely there is a gradient multiplied by the value, if value is zero then it is white instead of light.
The calculation should use a base color as a threshold.

Update

const colorScale = d3.scale.linear()
    .domain([ext[0], ext[1]])
    .range(['#FFF', 'black']);

This is the code that creates the scale, which means that every zero value will be white on white background.
Most likely the person who tested this had non-zero values for every country, I think we should be able to override the default colorScale function and colors in the world map form, usage of another scale is depicted here https://bl.ocks.org/mbostock/3306362

@olbapito
Copy link

This is still the behavior. Is there any workaround to alter the color scale?
Thanks!

@ghost
Copy link

ghost commented Jun 19, 2018

I now have the issue of countries with a 0 being darker than countries with a 1. Using 0.25.0.

@vladnvo
Copy link

vladnvo commented Feb 27, 2019

The same issue

@huntg
Copy link

huntg commented Mar 14, 2019

Still seeing this issue

@ghost
Copy link

ghost commented Apr 10, 2019

This issue was moved by kristw to apache-superset/superset-ui-plugins#53.

This issue was closed.
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

6 participants