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

Map country color cannot be changed on specific countries ( e.g 'Cote d\'Ivoire' / 'Democratic Republic of the Congo' ) #390

Open
MONTYYYYY opened this issue Jan 13, 2021 · 1 comment

Comments

@MONTYYYYY
Copy link

MONTYYYYY commented Jan 13, 2021

Certain African countries having the pink color, cannot be changed.
How can i change color?
e.g
['Cote d'Ivoire', null],
['Democratic Republic of the Congo', null],

Giving these countries a positive value does not make difference on map.
(link : https://react-google-charts.com/geo-chart)

Screenshot 2021-01-13 at 13 33 04

version : "react-google-charts": "^3.0.15".

Please help.
Note: I pulled down the repo and checked if i am using the exact country right names.

<Chart
width={'500px'}
height={'300px'}
chartType="GeoChart"
data={[
['Country', 'Latitude'],
['Algeria', 36],
['Angola', -8],
['Benin', 6],
['Botswana', -24],
['Burkina Faso', 12],
['Burundi', -3],
['Cameroon', 3],
['Canary Islands', 28],
['Cape Verde', 15],
['Central African Republic', 4],
['Ceuta', 35],
['Chad', 12],
['Comoros', -12],
["Cote d'Ivoire", 6],
['Democratic Republic of the Congo', -3],
['Djibouti', 12],
['Egypt', 26],
['Equatorial Guinea', 3],
['Eritrea', 15],
['Ethiopia', 9],
['Gabon', 0],
['Gambia', 13],
['Ghana', 5],
['Guinea', 10],
['Guinea-Bissau', 12],
['Kenya', -1],
['Lesotho', -29],
['Liberia', 6],
['Libya', 32],
['Madagascar', null],
['Madeira', 33],
['Malawi', -14],
['Mali', 12],
['Mauritania', 18],
['Mauritius', -20],
['Mayotte', -13],
['Melilla', 35],
['Morocco', 32],
['Mozambique', -25],
['Namibia', -22],
['Niger', 14],
['Nigeria', 8],
['Republic of the Congo', -1],
['Réunion', -21],
['Rwanda', -2],
['Saint Helena', -16],
['São Tomé and Principe', 0],
['Senegal', 15],
['Seychelles', -5],
['Sierra Leone', 8],
['Somalia', 2],
['Sudan', 15],
['South Africa', -30],
['South Sudan', 5],
['Swaziland', -26],
['Tanzania', -6],
['Togo', 6],
['Tunisia', 34],
['Uganda', 1],
['Western Sahara', 25],
['Zambia', -15],
['Zimbabwe', -18],
]}
options={{
region: '002', // Africa
colorAxis: { colors: ['#00853f', 'black', '#e31b23'] },
backgroundColor: '#81d4fa',
datalessRegionColor: '#f8bbd0',
defaultColor: '#f5f5f5',
}}
// Note: you will need to get a mapsApiKey for your project.
// See: https://developers.google.com/chart/interactive/docs/basic_load_libs#load-settings
mapsApiKey="YOUR_KEY_HERE"
rootProps={{ 'data-testid': '4' }}
/>

@MONTYYYYY
Copy link
Author

MONTYYYYY commented Jan 13, 2021

it works short country codes. E.g if [{v: 'CI', f: 'Cote d'Ivoire'}, 15] it works

@MONTYYYYY MONTYYYYY changed the title Color cannot be changed on specific African countries ( e.g 'Cote d\'Ivoire' / 'Cote d'Ivoire') Map country color cannot be changed on specific countries ( e.g 'Cote d\'Ivoire' / 'Democratic Republic of the Congo' ) Jul 28, 2021
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