How to website Theis site video Social media
#relatad update new photos video beautiful pics picsar t Upload Thak You
https://moinofficial20.com
Get link
Facebook
X
Pinterest
Email
Other Apps
Economic Dashboard
Global Economic Dashboard
GDP: Loading...
Inflation: Loading...
USD to EUR: Loading...
// Example using exchangerate.host API for exchange rate
fetch("https://api.exchangerate.host/latest?base=USD&symbols=EUR")
.then(response => response.json())
.then(data => {
document.getElementById("exchange").innerText = `USD to EUR: ${data.rates.EUR.toFixed(2)}`;
})
.catch(() => {
document.getElementById("exchange").innerText = "Exchange rate not available";
});
// You can use similar fetch calls for GDP and inflation if you have an API
Economic Data Dashboard
Welcome to the Economic Data Dashboard
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
}
header {
background-color: #2c3e50;
color: white;
padding: 20px;
text-align: center;
}
#dashboard {
display: flex;
justify-content: center;
margin-top: 20px;
}
button {
background-color: #3498db;
color: white;
padding: 10px 20px;
border: none;
cursor: pointer;
margin-top: 20px;
}
button:hover {
background-color: #2980b9;
}
footer {
text-align: center;
padding: 10px;
background-color: #2c3e50;
color: white;
position: fixed;
width: 100%;
bottom: 0;
}
// Function to fetch economic data and update the chart
function fetchEconomicData() {
// Example: fetching data from an API (you can replace this with a real economic API)
const economicData = {
years: [2010, 2011, 2012, 2013, 2014, 2015],
gdp: [1000, 1200, 1300, 1400, 1500, 1600],
};
// Update the chart with new data
updateChart(economicData);
}
// Function to update the chart with new data
function updateChart(data) {
const ctx = document.getElementById('gdpChart').getContext('2d');
const gdpChart = new Chart(ctx, {
type: 'line',
data: {
labels: data.years,
datasets: [{
label: 'GDP Over Time (in Billions)',
data: data.gdp,
borderColor: '#3498db',
fill: false,
tension: 0.1
}]
},
options: {
responsive: true,
scales: {
x: {
title: {
display: true,
text: 'Year'
}
},
y: {
title: {
display: true,
text: 'GDP (in Billions)'
}
}
}
});
}
// Call function on page load
document.addEventListener('DOMContentLoaded', () => {
fetchEconomicData();
});
Comments