Untitled
3 years ago in HTML
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Datum', '7-Tage-Inzidenz (Neuinfektionen)', 'Coronatote in 7 Tagen'],
['20.7.', 2383, 93],
['21.7.', 2222, 103],
['22.7.', 2340, 101],
['23.7.', 2012, 95],
['24.7.', 1886, 83],
['25.7.', 1716, 78],
['26.7.', 1716, 78],
['27.7.', 1716, 78],
['28.7.', 1347, 61],
['29.7.', 1328, 56],
['30.7.', 1278, 63],
['31.7.', 1337, 63],
[' 1.8.', 1425, 46],
[' 2.8.', 1425, 46],
[' 3.8.', 1425, 46],
[' 4.8.', 1617, 44],
[' 5.8.', 1687, 45],
[' 6.8.', 1758, 30],
[' 7.8.', 1867, 27],
[' 8.8.', 1901, 20],
[' 9.8.', 1901, 20],
['10.8.', 1901, 20],
['11.8.', 1960, 22],
['12.8.', 1945, 23],
['13.8.', 1915, 14],
['14.8.', 1885, 10]
]);
var options = {
width: 1000, height: 700,
title: 'Zahlen für Schweden vom 20. Juli bis 14. August',
legend: { position: 'bottom' },
series: {
0: {targetAxisIndex: 0},
1: {targetAxisIndex: 1}
},
hAxis: { slantedText:true, slantedTextAngle:70 },
vAxes: {
// Adds titles to each axis.
0: {title: 'Gemeldete Infizierte', minValue: 0},
1: {title: 'Gemeldete Todesfälle', maxValue: 250}
}
};
var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="curve_chart" style="width: 900px; height: 500px"></div>
</body>
</html>