Grouped countries map
How do I make an grouped countries map?
You can group countries of the map into groups, fill them with the same color add mouse interaction for the whole group. The map can automatically detect the bounds of the group and zoom-in to it.. What is a grouped countries map? How do you make a grouped countries map? This script and codes were developed by Otto Garcia on 02 December 2022, Friday.
Grouped countries map - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Grouped countries map</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src="https://www.amcharts.com/lib/3/ammap.js"></script>
<script src="https://www.amcharts.com/lib/3/maps/js/worldHigh.js"></script>
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<div id="chartdiv"></div> <script src='https://code.jquery.com/jquery-1.11.2.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Grouped countries map - Script Codes CSS Codes
#chartdiv { width: 100%; height: 500px;
}
Grouped countries map - Script Codes JS Codes
var map = AmCharts.makeChart( "chartdiv", { "type": "map", "theme": "light", "dataProvider": { "map": "worldHigh", "zoomLevel": 3.5, "zoomLongitude": 10, "zoomLatitude": 52, "areas": [ { "title": "Austria", "id": "AT", "color": "#67b7dc", "customData": "1995", "groupId": "before2004" }, { "title": "Ireland", "id": "IE", "color": "#67b7dc", "customData": "1973", "groupId": "before2004" }, { "title": "Denmark", "id": "DK", "color": "#67b7dc", "customData": "1973", "groupId": "before2004" }, { "title": "Finland", "id": "FI", "color": "#67b7dc", "customData": "1995", "groupId": "before2004" }, { "title": "Sweden", "id": "SE", "color": "#67b7dc", "customData": "1995", "groupId": "before2004" }, { "title": "Great Britain", "id": "GB", "color": "#67b7dc", "customData": "1973", "groupId": "before2004" }, { "title": "Italy", "id": "IT", "color": "#67b7dc", "customData": "1957", "groupId": "before2004" }, { "title": "France", "id": "FR", "color": "#67b7dc", "customData": "1957", "groupId": "before2004" }, { "title": "Spain", "id": "ES", "color": "#67b7dc", "customData": "1986", "groupId": "before2004" }, { "title": "Greece", "id": "GR", "color": "#67b7dc", "customData": "1981", "groupId": "before2004" }, { "title": "Germany", "id": "DE", "color": "#67b7dc", "customData": "1957", "groupId": "before2004" }, { "title": "Belgium", "id": "BE", "color": "#67b7dc", "customData": "1957", "groupId": "before2004" }, { "title": "Luxembourg", "id": "LU", "color": "#67b7dc", "customData": "1957", "groupId": "before2004" }, { "title": "Netherlands", "id": "NL", "color": "#67b7dc", "customData": "1957", "groupId": "before2004" }, { "title": "Portugal", "id": "PT", "color": "#67b7dc", "customData": "1986", "groupId": "before2004" }, { "title": "Lithuania", "id": "LT", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Latvia", "id": "LV", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Czech Republic ", "id": "CZ", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Slovakia", "id": "SK", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Slovenia", "id": "SI", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Estonia", "id": "EE", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Hungary", "id": "HU", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Cyprus", "id": "CY", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Malta", "id": "MT", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Poland", "id": "PL", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Romania", "id": "RO", "color": "#83c2ba", "customData": "2007", "groupId": "2007" }, { "title": "Bulgaria", "id": "BG", "color": "#83c2ba", "customData": "2007", "groupId": "2007" }, { "title": "Croatia", "id": "HR", "color": "#db8383", "customData": "2013", "groupId": "2013" } ] }, "areasSettings": { "rollOverOutlineColor": "#FFFFFF", "rollOverColor": "#CC0000", "alpha": 0.8, "unlistedAreasAlpha": 0.1, "balloonText": "[[title]] joined EU at [[customData]]" }, "legend": { "width": "100%", "marginRight": 27, "marginLeft": 27, "equalWidths": false, "backgroundAlpha": 0.5, "backgroundColor": "#FFFFFF", "borderColor": "#ffffff", "borderAlpha": 1, "top": 450, "left": 0, "horizontalGap": 10, "data": [ { "title": "EU member before 2004", "color": "#67b7dc" }, { "title": "Joined at 2004", "color": "#ebdb8b" }, { "title": "Joined at 2007", "color": "#83c2ba" }, { "title": "Joined at 2013", "color": "#db8383" } ] }, "export": { "enabled": true }
} );
Developer | Otto Garcia |
Username | good886 |
Uploaded | December 02, 2022 |
Rating | 3 |
Size | 2,625 Kb |
Views | 8,096 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
A Pen by Otto Garcia | 2,203 Kb |
Generador Marginal Energia | 3,208 Kb |
Clustered Bar Chart - EXPORTACIONES PUERTO DESTINO | 3,760 Kb |
Usa map test | 5,213 Kb |
3D Stacked Column Chart | 2,505 Kb |
Map with dynamic Pie charts | 3,892 Kb |
3D Pie Chart - MATRIZ GENERACION ENERGIA | 1,944 Kb |
Loading external CSV data for bubble map | 4,720 Kb |
PEAJE VAD | 2,958 Kb |
Drill-down column chart | 2,655 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
BenU Maintenance Site | Ksherman | 4,893 Kb |
Pure CSS Read More Arrow | Zephyr | 1,747 Kb |
BlueBox Fork | Huskynation | 12,675 Kb |
Revolving Text Landing Page Trial | TimRuby | 2,976 Kb |
A Pen by Moeid Saleem | Moeidsaleem | 1,862 Kb |
Mobile Nav Menu | AliKlein | 4,745 Kb |
Random Gradients - JS | Aldlevine | 2,026 Kb |
Simple star rating using js and data-uri | TheEnd | 5,795 Kb |
Mega Menu by Joni | Asakasinsky | 3,171 Kb |
CSS Variables | Jdsteinbach | 4,759 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!