68 lines
1.5 KiB
HTML
68 lines
1.5 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<script type="text/javascript" src="../js/Chart.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<canvas id="myChart" width="1000" height="500"></canvas>
|
|
<script>
|
|
|
|
var jsonfile = {
|
|
"jsonarray": [
|
|
_JSONDATA
|
|
]
|
|
};
|
|
|
|
var date = jsonfile.jsonarray.map(function(e) {
|
|
return e.date;
|
|
});
|
|
var rwallets = jsonfile.jsonarray.map(function(e) {
|
|
return e.rWallets;
|
|
});
|
|
var rmembres = jsonfile.jsonarray.map(function(e) {
|
|
return e.rMembres;
|
|
});
|
|
|
|
var ctx = document.getElementById("myChart");
|
|
var config = {
|
|
type: 'line',
|
|
data: {
|
|
labels: date,
|
|
datasets: [{
|
|
label: 'Ḡ1 reçus sur les simples portefeuilles',
|
|
data: rwallets,
|
|
backgroundColor: 'rgba(0, 119, 204, 0.3)',
|
|
pointBorderWidth: 1,
|
|
pointHoverRadius: 8,
|
|
pointHoverBackgroundColor: "beige",
|
|
pointHoverBorderColor: "brown",
|
|
pointHoverBorderWidth: 2,
|
|
pointRadius: 3,
|
|
pointHitRadius: 8
|
|
}, {
|
|
label: 'Ḡ1 reçus sur les portefeuilles membres',
|
|
data: rmembres,
|
|
backgroundColor: 'rgba(0, 178, 0, 0.3)',
|
|
pointBorderWidth: 1,
|
|
pointHoverRadius: 8,
|
|
pointHoverBackgroundColor: "beige",
|
|
pointHoverBorderColor: "brown",
|
|
pointHoverBorderWidth: 2,
|
|
pointRadius: 3,
|
|
pointHitRadius: 8
|
|
}]
|
|
},
|
|
options: {
|
|
maintainAspectRatio: false
|
|
}
|
|
};
|
|
|
|
var myChart = new Chart(ctx, config);
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|