html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<body>
<canvas id="myChart"></canvas>
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script>
<script type="text/javascript">
//Get JSON Data
function loadJSON(callback)
{
var xhr = new XMLHttpRequest();
xhr.overrideMimeType("application/json");
xhr.open('GET', 'https://filebin.net/bddbcas2xtfiufnj/data.json?t=at5f150y', true);
xhr.onreadystatechange = function()
{
if (xhr.readyState == 4 && xhr.status == "200") {
callback(xhr.responseText);
}
};
xhr.send(null);
}
(function init() {
loadJSON(function(response) {
// Parse JSON string into object
var actual_JSON = JSON.parse(response);
consumeData(actual_JSON); //Use this to consume JSON Data
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
body {
}
Enter to Rename, Shift+Enter to Preview
js
js
1
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run