sort date
This commit is contained in:
parent
72da607981
commit
d8fec72c5b
1 changed files with 5 additions and 0 deletions
5
app.js
5
app.js
|
@ -33,6 +33,11 @@ getData().then((data)=>{
|
||||||
console.log(date);
|
console.log(date);
|
||||||
console.log(ipv4_v6);
|
console.log(ipv4_v6);
|
||||||
|
|
||||||
|
date.sort((a, b)=>{
|
||||||
|
return new Date(b) - new Date(a)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
var ctx = document.getElementById("myChart").getContext('2d');
|
var ctx = document.getElementById("myChart").getContext('2d');
|
||||||
var chart = new Chart(ctx, {
|
var chart = new Chart(ctx, {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
|
|
Loading…
Reference in a new issue