i am trying to export a map chart as a pdf file locally, after i clicked highcharts says
Code: Select all
Error: Image type not supported for this chart/browser.
at h.o [as exportChartLocal] (offline-exporting.js?v=1.x:9:3790)
at h.onclick (offline-exporting.js?v=1.x:9:2102)
at HTMLLIElement.onclick (exporting.js?v=1.x:9:11862)
Code: Select all
(async () => {
const topology = await fetch(
'https://code.highcharts.com/mapdata/custom/world.topo.json'
).then(response => response.json());
var chart={
"chart": {
"type": "map",
"map": topology,
"backgroundColor": "#f5f5f3",
"margin": [
0,
0,
0,
0
],
"panning": {
"enabled": true,
"type": "xy"
}
},
"title": {
"text": ""
},
"credits": {
"enabled": false
},
"mapNavigation": {
"enabled": true,
"enableMouseWheelZoom": false,
"buttonOptions": {
"verticalAlign": "bottom",
"align": "left"
}
},
"legend": {
"enabled": false,
"layout": "vertical",
"align": "left",
"padding": 10,
"itemMarginTop": 6,
"itemMarginBottom": 6,
"itemStyle": {
"lineHeight": "16px"
},
"borderColor": "#dddddd",
"borderWidth": 1,
"verticalAlign": "bottom",
"fontSize": "19px",
"title": {
"text": "Value in %"
},
"rtl": false
},
"plotOptions": {
"series": {
"states": {
"hover": {
"enabled": true,
"borderColor": "#00add9",
"borderWidth": 5.2,
"backgroundColor": "transparent"
}
},
"cursor": "pointer"
}
},
"colorAxis": {
"labels": {
"format": "{value}%",
/*"style": {
"fontFamily": "'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, sans-serif",
"color": "#666666",
"fontSize": "12px"
}*/
},
"max": 100,
"min": 0,
"stops": [
[
-50,
"#f5f5f3"
],
[
-30,
"#f5f5f3"
],
[
-0.2,
"#ffffff"
],
[
-0.0999,
"#ffffff"
],
[
-0.1,
"#A6A6A6"
],
[
-0.009899999999999999,
"#A6A6A6"
],
[
0,
"#ffb300"
],
[
0.5,
"#ffb300"
],
[
0.5001,
"#ffd54f"
],
[
0.75,
"#ffd54f"
],
[
0.7501000000000001,
"#4fc3f7"
],
[
0.9,
"#4fc3f7"
],
[
0.9001,
"#0288d1"
],
[
1,
"#0288d1"
]
]
},
"tooltip": {
"useHTML": false,
"borderWidth": 1,
"padding": 10,
/*"style": {
"fontSize": "12px",
"fontFamily": "'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, sans-serif"
}*/
},
"series": [
{
"joinBy": [
"iso-a3",
"key"
],
"data": [
{
"key": "REU",
"value": 96,
"year": "2022",
"country": "Réunion"
},
{
"key": "ROU",
"value": 82,
"year": "2022",
"country": "Romania"
},
{
"key": "RUS",
"value": 76,
"year": "2022",
"country": "Russian Federation"
},
{
"key": "BLM",
"value": 100,
"year": "2022",
"country": "Saint Barthélemy"
},
{
"key": "SHN",
"value": 89,
"year": "2022",
"country": "Saint Helena"
},
{
"key": "MAF",
"value": 97,
"year": "2022",
"country": "Saint Martin (French Part)"
},
{
"key": "SPM",
"value": 83,
"year": "2020",
"country": "Saint Pierre and Miquelon"
},
{
"key": "SMR",
"value": 100,
"year": "2022",
"country": "San Marino"
},
{
"key": "STP",
"value": 36,
"year": "2022",
"country": "Sao Tome and Principe"
},
{
"key": "SEN",
"value": 27,
"year": "2022",
"country": "Senegal"
},
{
"key": "SRB",
"value": 75,
"year": "2022",
"country": "Serbia"
},
{
"key": "SLE",
"value": 10,
"year": "2022",
"country": "Sierra Leone"
},
{
"key": "SGP",
"value": 100,
"year": "2022",
"country": "Singapore"
},
{
"key": "SVK",
"value": 99,
"year": "2022",
"country": "Slovakia"
},
{
"key": "VNM",
"value": 58,
"year": "2022",
"country": "Viet Nam"
},
{
"key": "SVN",
"value": 98,
"year": "2022",
"country": "Slovenia"
},
{
"key": "ZWE",
"value": 27,
"year": "2022",
"country": "Zimbabwe"
},
{
"key": "ESP",
"value": 100,
"year": "2022",
"country": "Spain"
},
{
"key": "SUR",
"value": 56,
"year": "2022",
"country": "Suriname"
},
{
"key": "SWE",
"value": 100,
"year": "2022",
"country": "Sweden"
},
{
"key": "CHE",
"value": 97,
"year": "2022",
"country": "Switzerland"
},
{
"key": "TJK",
"value": 55,
"year": "2022",
"country": "Tajikistan"
},
{
"key": "TGO",
"value": 19,
"year": "2022",
"country": "Togo"
},
{
"key": "TON",
"value": 30,
"year": "2022",
"country": "Tonga"
},
{
"key": "TUN",
"value": 74,
"year": "2022",
"country": "Tunisia"
},
{
"key": "TKM",
"value": 95,
"year": "2022",
"country": "Turkmenistan"
},
{
"key": "TCA",
"value": 47,
"year": "2022",
"country": "Turks and Caicos Islands"
},
{
"key": "TUV",
"value": 9,
"year": "2022",
"country": "Tuvalu"
},
{
"key": "UGA",
"value": 19,
"year": "2022",
"country": "Uganda"
},
{
"key": "UKR",
"value": 88,
"year": "2022",
"country": "Ukraine"
},
{
"key": "MKD",
"value": 80,
"year": "2022",
"country": "North Macedonia"
},
{
"key": "GBR",
"value": 100,
"year": "2022",
"country": "United Kingdom of Great Britain and Northern Ireland"
},
{
"key": "CHI",
"value": 92,
"year": "2017",
"country": "Channel Islands"
},
{
"key": "IMN",
"value": 100,
"year": "2022",
"country": "Isle of Man"
},
{
"key": "TZA",
"value": 11,
"year": "2022",
"country": "United Republic of Tanzania"
},
{
"key": "USA",
"value": 97,
"year": "2022",
"country": "United States of America"
},
{
"key": "VIR",
"value": 98,
"year": "2020",
"country": "United States Virgin Islands"
},
{
"key": "UZB",
"value": 80,
"year": "2022",
"country": "Uzbekistan"
},
{
"key": "WLF",
"value": 69,
"year": "2022",
"country": "Wallis and Futuna Islands"
},
{
"key": "WSM",
"value": 62,
"year": "2022",
"country": "Samoa"
},
{
"key": "X15",
"value": -5,
"name": "",
"country": ""
},
{
"key": "XX1",
"value": -5,
"name": "",
"country": "Jammu and kashmir"
},
{
"key": "XX2",
"value": -5,
"name": "",
"country": ""
},
{
"key": "XX3",
"value": -5,
"name": "",
"country": ""
},
{
"key": "XX4",
"value": -5,
"name": "",
"country": ""
},
{
"key": "XX5",
"value": -5,
"name": "",
"country": "Ilemi triangle"
},
{
"key": "XX6",
"value": -5,
"name": "",
"country": ""
},
{
"key": "XX7",
"value": -5,
"name": "",
"country": ""
},
{
"key": "XX8",
"value": -5,
"name": "",
"country": ""
},
{
"key": "X10",
"value": -5,
"name": "",
"country": ""
},
{
"key": "X11",
"value": -5,
"name": "",
"country": ""
},
{
"key": "X12",
"value": -5,
"name": "",
"country": ""
},
{
"key": "X13",
"value": -5,
"name": "",
"country": ""
},
{
"key": "X14",
"value": -5,
"name": "",
"country": ""
},
{
"key": "ABW",
"value": -5,
"year": "2024",
"country": "Aruba"
},
{
"key": "AGO",
"value": -5,
"year": "2024",
"country": "Angola"
},
{
"key": "AIA",
"value": -5,
"year": "2024",
"country": "Anguilla"
},
{
"key": "ALA",
"value": -5,
"year": "2024",
"country": "Åland Islands"
},
{
"key": "ARE",
"value": -5,
"year": "2024",
"country": "United Arab Emirates"
},
{
"key": "ARG",
"value": -5,
"year": "2024",
"country": "Argentina"
},
{
"key": "ATA",
"value": -5,
"year": "2024",
"country": "Antarctica"
},
{
"key": "ATF",
"value": -5,
"year": "2024",
"country": "French Southern Territories"
},
{
"key": "ATG",
"value": -5,
"year": "2024",
"country": "Antigua and Barbuda"
},
{
"key": "AUS",
"value": -5,
"year": "2024",
"country": "Australia"
},
{
"key": "BDI",
"value": -5,
"year": "2024",
"country": "Burundi"
},
{
"key": "BEN",
"value": -5,
"year": "2024",
"country": "Benin"
},
{
"key": "BFA",
"value": -5,
"year": "2024",
"country": "Burkina Faso"
},
{
"key": "BHS",
"value": -5,
"year": "2024",
"country": "Bahamas"
},
{
"key": "BLZ",
"value": -5,
"year": "2024",
"country": "Belize"
},
{
"key": "BMU",
"value": -5,
"year": "2024",
"country": "Bermuda"
},
{
"key": "BOL",
"value": -5,
"year": "2024",
"country": "Bolivia (Plurinational State of)"
},
{
"key": "BRB",
"value": -5,
"year": "2024",
"country": "Barbados"
},
{
"key": "BRN",
"value": -5,
"year": "2024",
"country": "Brunei Darussalam"
},
{
"key": "BVT",
"value": -5,
"year": "2024",
"country": "Bouvet Island"
},
{
"key": "BWA",
"value": -5,
"year": "2024",
"country": "Botswana"
},
{
"key": "CCK",
"value": -5,
"year": "2024",
"country": "Cocos (Keeling) Islands"
},
{
"key": "CHN",
"value": -5,
"year": "2024",
"country": "China"
},
{
"key": "CMR",
"value": -5,
"year": "2024",
"country": "Cameroon"
},
{
"key": "COK",
"value": -5,
"year": "2024",
"country": "Cook Islands"
},
{
"key": "COM",
"value": -5,
"year": "2024",
"country": "Comoros"
},
{
"key": "CPV",
"value": -5,
"year": "2024",
"country": "Cabo Verde"
},
{
"key": "CUB",
"value": -5,
"year": "2024",
"country": "Cuba"
},
{
"key": "CUW",
"value": -5,
"year": "2024",
"country": "Curaçao"
},
{
"key": "CYM",
"value": -5,
"year": "2024",
"country": "Cayman Islands"
},
{
"key": "CYR",
"value": -5,
"year": "2024",
"country": "Christmas Island"
},
{
"key": "DJI",
"value": -5,
"year": "2024",
"country": "Djibouti"
},
{
"key": "DMA",
"value": -5,
"year": "2024",
"country": "Dominica"
},
{
"key": "EGY",
"value": -5,
"year": "2024",
"country": "Egypt"
},
{
"key": "ERI",
"value": -5,
"year": "2024",
"country": "Eritrea"
},
{
"key": "ESH",
"value": -5,
"year": "2024",
"country": "Western Sahara"
},
{
"key": "FLK",
"value": -5,
"year": "2024",
"country": "Falkland Islands (Malvinas)"
},
{
"key": "FRO",
"value": -5,
"year": "2024",
"country": "Faroe Islands"
},
{
"key": "FSM",
"value": -5,
"year": "2024",
"country": "Micronesia (Federated States of)"
},
{
"key": "GAB",
"value": -5,
"year": "2024",
"country": "Gabon"
},
{
"key": "GGY",
"value": -5,
"year": "2024",
"country": "Guernsey"
},
{
"key": "GIN",
"value": -5,
"year": "2024",
"country": "Guinea"
},
{
"key": "GNQ",
"value": -5,
"year": "2024",
"country": "Equatorial Guinea"
},
{
"key": "GRL",
"value": -5,
"year": "2024",
"country": "Greenland"
},
{
"key": "GUY",
"value": -5,
"year": "2024",
"country": "Guyana"
},
{
"key": "HMD",
"value": -5,
"year": "2024",
"country": "Heard Island and McDonald Islands"
},
{
"key": "HTI",
"value": -5,
"year": "2024",
"country": "Haiti"
},
{
"key": "IND",
"value": -5,
"year": "2024",
"country": "India"
},
{
"key": "IOT",
"value": -5,
"year": "2024",
"country": "British Indian Ocean Territory"
},
{
"key": "JAM",
"value": -5,
"year": "2024",
"country": "Jamaica"
},
{
"key": "JEY",
"value": -5,
"year": "2024",
"country": "Jersey"
},
{
"key": "KEN",
"value": -5,
"year": "2024",
"country": "Kenya"
},
{
"key": "KNA",
"value": -5,
"year": "2024",
"country": "Saint Kitts and Nevis"
},
{
"key": "LBR",
"value": -5,
"year": "2024",
"country": "Liberia"
},
{
"key": "LBY",
"value": -5,
"year": "2024",
"country": "Libya"
},
{
"key": "LCA",
"value": -5,
"year": "2024",
"country": "Saint Lucia"
},
{
"key": "MDV",
"value": -5,
"year": "2024",
"country": "Maldives"
},
{
"key": "MHL",
"value": -5,
"year": "2024",
"country": "Marshall Islands"
},
{
"key": "MLI",
"value": -5,
"year": "2024",
"country": "Mali"
},
{
"key": "MOZ",
"value": -5,
"year": "2024",
"country": "Mozambique"
},
{
"key": "MRT",
"value": -5,
"year": "2024",
"country": "Mauritania"
},
{
"key": "MSR",
"value": -5,
"year": "2024",
"country": "Montserrat"
},
{
"key": "MUS",
"value": -5,
"year": "2024",
"country": "Mauritius"
},
{
"key": "NAM",
"value": -5,
"year": "2024",
"country": "Namibia"
},
{
"key": "NER",
"value": -5,
"year": "2024",
"country": "Niger"
},
{
"key": "NFK",
"value": -5,
"year": "2024",
"country": "Norfolk Island"
},
{
"key": "NRU",
"value": -5,
"year": "2024",
"country": "Nauru"
},
{
"key": "PAN",
"value": -5,
"year": "2024",
"country": "Panama"
},
{
"key": "PCN",
"value": -5,
"year": "2024",
"country": "Pitcairn"
},
{
"key": "PNG",
"value": -5,
"year": "2024",
"country": "Papua New Guinea"
},
{
"key": "RWA",
"value": -5,
"year": "2024",
"country": "Rwanda"
},
{
"key": "SAU",
"value": -5,
"year": "2024",
"country": "Saudi Arabia"
},
{
"key": "SDN",
"value": -5,
"year": "2024",
"country": "Sudan"
},
{
"key": "SGS",
"value": -5,
"year": "2024",
"country": "South Georgia and the South Sandwich Islands"
},
{
"key": "SJM",
"value": -5,
"year": "2024",
"country": "Svalbard and Jan Mayen Islands"
},
{
"key": "SLB",
"value": -5,
"year": "2024",
"country": "Solomon Islands"
},
{
"key": "SLV",
"value": -5,
"year": "2024",
"country": "El Salvador"
},
{
"key": "SOM",
"value": -5,
"year": "2024",
"country": "Somalia"
},
{
"key": "SSD",
"value": -5,
"year": "2024",
"country": "South Sudan"
},
{
"key": "SWZ",
"value": -5,
"year": "2024",
"country": "Eswatini"
},
{
"key": "SYC",
"value": -5,
"year": "2024",
"country": "Seychelles"
},
{
"key": "SYR",
"value": -5,
"year": "2024",
"country": "Syrian Arab Republic"
},
{
"key": "THA",
"value": -5,
"year": "2024",
"country": "Thailand"
},
{
"key": "TKL",
"value": -5,
"year": "2024",
"country": "Tokelau"
},
{
"key": "TLS",
"value": -5,
"year": "2024",
"country": "Timor-Leste"
},
{
"key": "TTO",
"value": -5,
"year": "2024",
"country": "Trinidad and Tobago"
},
{
"key": "TUR",
"value": -5,
"year": "2024",
"country": "Türkiye"
},
{
"key": "UMI",
"value": -5,
"year": "2024",
"country": "United States Minor Outlying Islands"
},
{
"key": "URY",
"value": -5,
"year": "2024",
"country": "Uruguay"
},
{
"key": "VAT",
"value": -5,
"year": "2024",
"country": "Holy See"
},
{
"key": "VCT",
"value": -5,
"year": "2024",
"country": "Saint Vincent and the Grenadines"
},
{
"key": "VEN",
"value": -5,
"year": "2024",
"country": "Venezuela (Bolivarian Republic of)"
},
{
"key": "VGB",
"value": -5,
"year": "2024",
"country": "British Virgin Islands"
},
{
"key": "VUT",
"value": -5,
"year": "2024",
"country": "Vanuatu"
},
{
"key": "YEM",
"value": -5,
"year": "2024",
"country": "Yemen"
},
{
"key": "ZAF",
"value": -5,
"year": "2024",
"country": "South Africa"
},
{
"key": "ZMB",
"value": -5,
"year": "2024",
"country": "Zambia"
},
{
"key": "0",
"value": -5,
"year": "2024",
"country": "Sark"
},
{
"key": "SXM",
"value": -5,
"year": "2024",
"country": "Sint Maarten (Dutch part)"
},
{
"key": "XKX",
"value": -5,
"year": "2024",
"country": "Kosovo"
}
],
"nullcolor": "#D9D9D9",
"name": "6.1.1",
"states": {
"hover": {
"enabled": false
}
},
"dataLabels": {
"enabled": false,
"format": "{point.name}%",
"style": {
"fontSize": "13px"
}
}
}
],
"plotOptions": {
"series": {
"states": {
"hover": {
"enabled": true,
"borderColor": "#00add9",
"borderWidth": 5.2,
"backgroundColor": "transparent"
}
},
"cursor": "pointer"
}
}
},
"scale": 1,
"buttons": {
"contextButton": {
"menuItems": [
"downloadPNG",
"downloadJPEG",
"downloadPDF",
"downloadSVG"
],
//"symbol": "url(/themes/custom/unwater/images/toggle_button.png)",
"className": "tooltip-unwater"
}
}
}
};
Highcharts.mapChart('indicate-indicator',chart);
})();