Difference between revisions of "Covid-19 Progress in Turkey"
Line 320: | Line 320: | ||
<body> | <body> | ||
− | <div id=" | + | <div id="chart_div_3"></div> |
+ | </body> | ||
+ | </html> | ||
+ | |||
+ | <html> | ||
+ | <head> | ||
+ | <!--Load the AJAX API--> | ||
+ | <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(drawVisualization); | ||
+ | |||
+ | function drawVisualization() { | ||
+ | // Some raw data (not necessarily accurate) | ||
+ | var data = google.visualization.arrayToDataTable([ | ||
+ | ['Day', 'Cumulative', 'Daily'], | ||
+ | // Day 1 = March 10, 2020 | ||
+ | [244,394255,2516], | ||
+ | [245,396831,2576], | ||
+ | [246,399360,2529], | ||
+ | [247,402053,2693], | ||
+ | [248,404894,2841], | ||
+ | [249,407939,3045], | ||
+ | [250,411055,3116], | ||
+ | [251,414278,3223], | ||
+ | [252,417594,3316], | ||
+ | [253,421413,3819], | ||
+ | [254,425628,4215], | ||
+ | [255,430170,4542], | ||
+ | [256,435273,5103], | ||
+ | [257,440805,5532], | ||
+ | [258,446822,6017], | ||
+ | [259,453535,6713], | ||
+ | [260,460916,7381], | ||
+ | [261,467730,6814], | ||
+ | [262,503738,36008], | ||
+ | [263,548244,44506], | ||
+ | [264,578347,30103], | ||
+ | [265,607628,29281], | ||
+ | [266,638847,31219], | ||
+ | [267,668957,30110], | ||
+ | [268,700880,31923], | ||
+ | [269,733261,32381], | ||
+ | [270,765997,32736], | ||
+ | [271,797893,31896], | ||
+ | [272,828295,30402], | ||
+ | [273,858697,32137], | ||
+ | [274,891895,33198] | ||
+ | ]); | ||
+ | |||
+ | // Set chart options | ||
+ | var options = { | ||
+ | title : 'COVID-19 Cases in Turkey', | ||
+ | fontName: 'Old Standard TT', | ||
+ | vAxis: { | ||
+ | title: 'Cases', | ||
+ | // maxValue: '20000', | ||
+ | // scaleType: 'log', | ||
+ | }, | ||
+ | hAxis: {title: 'Day'}, | ||
+ | seriesType: 'bars', | ||
+ | series:{ | ||
+ | 0: {type: 'line', | ||
+ | color: '#982F00', | ||
+ | lineWidth: 3, | ||
+ | // pointSize: 4, | ||
+ | }, | ||
+ | 1: {type: 'bars', color: 'black'},}, | ||
+ | // 'width':600, | ||
+ | 'height':400, | ||
+ | // crosshair: { trigger: 'both', opacity: 0.5 }, | ||
+ | // trendlines: { 1: {} } // Draw a trendline for data series 1, | ||
+ | }; | ||
+ | |||
+ | var chart = new google.visualization.ComboChart(document.getElementById('chart_div_3')); | ||
+ | chart.draw(data, options); | ||
+ | } | ||
+ | </script> | ||
+ | </head> | ||
+ | |||
+ | <body> | ||
+ | <div id="chart_div_3"></div> | ||
</body> | </body> | ||
</html> | </html> |
hkilter.com by H. K. Ilter is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
© 2020 H. K. Ilter