Template talk:Graph:Map

Heading
MSG17, thank you very much for fixing this. It looks really useful and I have every intention of using it. I've mentioned it on T120809. May I make a feature request? Could there be some way to group countries, so one could colour, say, all of Africa one colour, and then override with exceptions? This would make filling in maps where every country is highlighted easier. It might be easiest and most flexible to do this by recursively mentioning maps (i.e. "default to the colouring of Template:Sub-saharan Africa, but Namibia should be in red"). This could be especially useful for historical sequences, but you may well have a better idea. HLHJ (talk) 01:12, 21 January 2019 (UTC)
 * Thank you for noticing my template! There is a way to do this, but it would be really janky. Essentially, I could add another parameter to each country to denote continent or membership in a certain international organiztion. For example, Italy's color could be set by the IT parameter, but it also could be set by the EU parameter which would also set the colors of other EU countries. However, this would mean that you couldn't color any country inside that group differently. The better way would be to modify the source data to feature continents and other such groupings (and maybe even make sure the rendering order is implmented in such a way that countries that need a different color from the rest of the group would be able to get it), but that is something that would take more time to do. I'll see about what I can do, and also look into changing the map data to another source as well. Also, don't give me credit! I simply took what I found at the Wikimedia demo page for the Graph extension. Some other people also found it on their own and made a similar template at wiki, which I noted at the Community Tech Wishlist page. MSG17 (talk) 15:19, 21 January 2019 (UTC)

Edit request 2019-03-17
Change content model to JSON. &#123;&#123;3x&#124;p&#125;&#125;ery (talk) 00:20, 17 March 2019 (UTC)
 * I really wish I had the technical ability to implement this myself instead of having to edit-request it every time, but that's for another discussion. &#123;&#123;3x&#124;p&#125;&#125;ery (talk) 02:30, 17 March 2019 (UTC)
 * OK I've done this, can you validate if there are any issues - I'm not loving that the file is ~200K LARGER now for page loads.... — xaosflux  Talk 03:56, 21 March 2019 (UTC)

Seems to work. &#123;&#123;3x&#124;p&#125;&#125;ery (talk) 03:59, 21 March 2019 (UTC)

colorScale options
The colorScale example code says. Is that right? When I used it like that, with a colour name, I got odd results, but when I replaced the colour name with an actual value (typically the min), it was all sorted. — Guarapiranga (talk) 07:56, 24 September 2019 (UTC)


 * I looked everywhere for documentation on colorScales options, to no avail. Where should we look? All I found are the  and   options. — Guarapiranga (talk) 07:59, 24 September 2019 (UTC)


 * Found it here (not sure which of these have been implemented on WP, though). — Guarapiranga (talk) 12:03, 4 October 2019 (UTC)

Country subdivisions
Would it be too much to ask this template to handle ISO 3166-2 country subdivisions (federated states, provinces, regions, etc)? — Guarapiranga (talk) 12:22, 7 October 2019 (UTC)
 * Its possible - I think there is a similar basemap for subdivisions that can be implemented. It will take a while to test the template with it however. MSG17 (talk) 16:28, 15 January 2020 (UTC)

Not displaying on mobile
This template is used on List of countries by prevalence of genital cutting. I can see the map on desktop but on mobile it's showing the titles but not the actual maps. Someone else also noticed on the Talk page. Akeosnhaoe (talk) 04:00, 15 October 2019 (UTC)
 * I tested it on my mobile (Android), on various browsers, and found it works if I switch them to the desktop view, but on mobile view the graphs don't show in any of them. Guarapiranga (talk) 08:58, 19 October 2019 (UTC)


 * Had the same issue yesterday when i made a graph for external reference pricing, where it was not showing the map on smartphones but when going to the template Template:ERPworldmap from which the map is transcluded, then it worked in any case. But today i check the article on mobile and the map now works! I guess there may be an issue with the picture caching of graph map, which may have wrong http parameters that then delays updates to propagate on mobiles (since they are more careful about data consumption, they check http parameters and not necessarily the image content and size so if the map was changed, phones may maybe try to get the old cache that do not exist anymore). This is just a hypothesis, but what is certain is that it happens only when transcluding. Signimu (talk) 12:31, 29 November 2019 (UTC)

Default color for missing values in quantitative map
Hello, I would like to make a quantitative map, but I've got values on for some countries, not all. For countries where I have no values, I would like to show them in a different color, such as grey. I did not find how to do this, I tried to change defaultValue but it only sets a default value (BTW the example seems wrong, this should not be red but something like 0.0), and defaultColor is superceded by defaultValue when making a quantitative map. Choosing a default value would be wrong in my case, I really need to show missing values in a different color. Here is an example of what I'm trying to do:. Would it be possible to modify the LUA script to add this possibility? I can give it a try myself if it's possible (I don't know if this template is linked with mediawiki updates). --Signimu (talk) 16:31, 8 December 2019 (UTC)

How to remove or change the thousands separator in the legend?
Years are typically written 2020 all over the world, but the legend of this template shows them as 2,020. In a majority of the languages, one thousand is written 1.000 or 1 000, and pi is written 3,14. How can I adopt the legend of this template to show years without a thousands separator, or to the national conventions, instead of comma as thousand separator? See for example, the years in this German and Swedish example. Tomastvivlaren (talk) 16:20, 12 April 2020 (UTC)

Would like a version of this template for US map of states
A US map with color bar legend would be nice for this data below that uses Graph:Chart

See: Statistics of the COVID-19 pandemic in the United States

It has this currently:

COVID-19 deaths per million of the populations of each state, along with the District of Columbia and Puerto Rico, as of February 10, 2022:

I would prefer a color bar legend instead of this type of legend for this map by :
 * File:Persons died due to coronavirus COVID-19 per capita in Europe.svg

Here is a map with a color bar: Unfortunately, I haven't found a US map with that data on that Our World in Data site. --Timeshifter (talk) 00:51, 18 February 2022 (UTC)
 * File:World map of total confirmed COVID-19 deaths per million people by country.png


 * I agree, the number of default basemaps is too low, only world and swiss. The two I would like to prioritize are: Europe, USA. HudecEmil (talk) 19:47, 19 June 2022 (UTC)

colorScale
colorScale when using comma-separated list of color values seems only to work with 2 values, not with more. Is it possible to have longer lists? For example, to be able reproduce the two above choropleths HudecEmil (talk) 20:09, 19 June 2022 (UTC)

Little preview/Full scale image
Hello Is it possible add a new property to this template? This template has a property "scale", but i think it is not ideal for some kind of pages.

For example: For pages where would you like show military operators of the vehicles/aircrafts is good add small preview of image of map generated by this template. After click show full size image. Similar like a clasic image file. MestskyVlk (talk) 10:08, 28 December 2022 (UTC)

Still disabled?
I would like to specify a world map with a number of countries shaded, but without creating and uploading a new image file. I've

've been trying to use Highlighted world map by country, but there's no timescale on when it will be fixed. What's the best alternative? 213.78.185.21 (talk) 18:55, 18 April 2024 (UTC)