var servicesURL = {
getAllCasesGroupByContinent : 'https://83.212.77.22:9443/services/get_all_cases_group_by_continent.php',
getContinents: 'https://83.212.77.22:9443/services/get_continents.php',
getGroupByChooseContinent: 'https://83.212.77.22:9443/services/get_group_by_choose_continent_data.php',
getCountries: 'https://83.212.77.22:9443/services/get_countries.php',
getCountryDataInSpecificDates: 'https://83.212.77.22:9443/services/get_country_data_specific_dates.php',
getLastDate: 'https://83.212.77.22:9443/services/get_last_date.php',
getContinentsDataInSpecificDates: 'https://83.212.77.22:9443/services/get_continent_data_specific_dates.php',
getTotalCasesAndDeaths: 'https://83.212.77.22:9443/services/get_total_cases_deaths.php'
}
var WebCall = {
charts: [],
renderCasesGroupByContinent: function(elementID){
$.get(servicesURL.getAllCasesGroupByContinent).done(function(data){
let options={
series: [],
chart: {
width: 600,
type: 'pie'
},
labels: [],
responsive: [{
breakpoint: 800,
options: {
chart: {
width: 300
},
legend: {
position: 'bottom'
}
}
}]
};
data.forEach(function(element){
options.series.push(parseInt(element.Cases,10));
options.labels.push(element.continentExp);
});
WebCall.renderChart(elementID, options);
});
},
initalizeContinentsSelector: function(selectorID){
$.get(servicesURL.getContinents).done(function (data) {
let selector = $(selectorID);
selector.append($("