From fd8249dce2fa7b524236872fe4d649cf3a6e8a6c Mon Sep 17 00:00:00 2001 From: wisnupramoedya Date: Tue, 31 Mar 2020 15:20:47 +0700 Subject: [PATCH] w-3.1 Map Indo Positif Sembuh Meninggal --- indo.html | 181 ++++++++++++++++++++++++------------------- rumahsakit/index.php | 54 ++++++------- 2 files changed, 129 insertions(+), 106 deletions(-) diff --git a/indo.html b/indo.html index 10c16af..1237680 100644 --- a/indo.html +++ b/indo.html @@ -7,87 +7,110 @@ +
- - + - + + dataprov.forEach(attrib => { + output[attrib.attributes.FID - 1][1][0] = attrib.attributes.Kasus_Posi + output[attrib.attributes.FID - 1][1][1] = attrib.attributes.Kasus_Semb + output[attrib.attributes.FID - 1][1][2] = attrib.attributes.Kasus_Meni + }); + + getMap(output); + }else{ + const errorMSG = document.createElement('marquee') + errorMSG.textContent = 'Server mungkin bermasalah' + showError.appendChild(errorMSG) + } + } + request.send() + + function getMap(output){ + // Create the chart + Highcharts.mapChart('container', { + chart: { + map: 'countries/id/id-all' + }, + + title: { + text: 'Corona Virus Indonesia' + }, + + subtitle: { + text: 'Source map: Indonesia' + }, + + mapNavigation: { + enabled: true, + buttonOptions: { + verticalAlign: 'bottom' + } + }, + + series: [{ + data: output, + name: 'Positif-Sembuh-Meninggal', + states: { + hover: { + color: '#BADA55' + } + }, + dataLabels: { + enabled: true, + format: '{point.name}' + } + }] + }); + } + + diff --git a/rumahsakit/index.php b/rumahsakit/index.php index dee2be6..fea93f6 100644 --- a/rumahsakit/index.php +++ b/rumahsakit/index.php @@ -25,35 +25,35 @@
-