superset icon indicating copy to clipboard operation
superset copied to clipboard

WorldMap coloring makes countries invisible

Open mwullink opened this issue 10 years ago • 6 comments

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.

mwullink avatar Nov 01 '16 15:11 mwullink

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

Igosuki avatar Jan 26 '17 16:01 Igosuki

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

olbapito avatar Feb 26 '18 20:02 olbapito

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

ghost avatar Jun 19 '18 14:06 ghost

The same issue

vladnvo avatar Feb 27 '19 08:02 vladnvo

Still seeing this issue

huntg avatar Mar 14 '19 14:03 huntg

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

ghost avatar Apr 10 '19 16:04 ghost