Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

WorldMap coloring makes countries invisible #53

Closed
ghost opened this issue Apr 10, 2019 · 10 comments
Closed

WorldMap coloring makes countries invisible #53

ghost opened this issue Apr 10, 2019 · 10 comments
Labels
#bug Something isn't working

Comments

@ghost
Copy link

ghost commented Apr 10, 2019

@mwullink commented on Nov 1, 2016, 3:45 PM UTC:

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.

This issue was moved by kristw from apache/incubator-superset#1497.

@ghost
Copy link
Author

ghost commented Apr 10, 2019

@Igosuki commented on Jan 26, 2017, 4:16 PM UTC:

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

@ghost
Copy link
Author

ghost commented Apr 10, 2019

@olbapito commented on Feb 26, 2018, 8:30 PM UTC:

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

@ghost
Copy link
Author

ghost commented Apr 10, 2019

@Tyler-Rex commented on Jun 19, 2018, 2:18 PM UTC:

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

@ghost
Copy link
Author

ghost commented Apr 10, 2019

@vladnvo commented on Feb 27, 2019, 8:50 AM UTC:

The same issue

@ghost
Copy link
Author

ghost commented Apr 10, 2019

@huntg commented on Mar 14, 2019, 2:23 PM UTC:

Still seeing this issue

@kristw kristw added the #bug Something isn't working label Apr 10, 2019
@manavbagai
Copy link

Still seeing this issue

@christophlingg
Copy link
Contributor

I am experiencing the same issue. To illustrate the problem you can see an example with very high numbers in Germany. The color coding has multiple issues:

  • countries with no data are darker than countries with low numbers
  • borders of countries with low numbers are not visible

Bildschirmfoto 2019-09-30 um 14 22 28

@Igosuki
Copy link

Igosuki commented Sep 30, 2019

We just need to patch this

@christophlingg
Copy link
Contributor

@Igosuki I created a PR, what is missing is trying it out locally, do you have experience in running superset-ui-plugins locally?

christophlingg added a commit to komoot/superset-ui-plugins that referenced this issue Oct 17, 2019
@kristw kristw closed this as completed in f94a19b Oct 18, 2019
@stelios313
Copy link

I m having the same issue, is this solved in 0.35?

kristw pushed a commit to apache-superset/superset-ui that referenced this issue Apr 17, 2020
nytai pushed a commit to preset-io/superset-ui-plugins that referenced this issue Apr 27, 2020
feat: Export `SupersetClientClass`
internal: Increase test coverage.
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 17, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 24, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 25, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
#bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants