Skip to content

Commit

Permalink
Update ranking chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Petah committed Sep 5, 2020
1 parent d12e71a commit f96b699
Showing 1 changed file with 25 additions and 10 deletions.
35 changes: 25 additions & 10 deletions debug/rankings.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ function readRankings($file)
'type' => 'line',
'pointRadius' => 0,
'fill' => false,
// 'lineTension' => 0,
'borderWidth' => 2,
'lineTension' => 0,
'borderWidth' => 1,
'hidden' => !in_array($player, $mySnakes),
];
}
Expand Down Expand Up @@ -85,26 +85,26 @@ function readRankings($file)
text: <?= json_encode($label); ?>,
},
animation: {
duration: 0
duration: 0,
},
tooltips: {
mode: 'index',
intersect: false,
},
hover: {
mode: 'nearest',
intersect: true
intersect: true,
},
scales: {
xAxes: [{
display: true,
type: 'time',
time: {
tooltipFormat: 'll HH:mm'
tooltipFormat: 'll HH:mm',
},
scaleLabel: {
display: true,
labelString: 'Date'
labelString: 'Date',
}
}],
yAxes: [{
Expand All @@ -115,11 +115,26 @@ function readRankings($file)
},
scaleLabel: {
display: true,
labelString: 'Rank'
}
}]
labelString: 'Rank',
},
}],
},
pan: {
enabled: true,
mode: "x",
speed: 10,
threshold: 10
},
zoom: {
enabled: true,
drag: false,
mode: "xy",
limits: {
max: 10,
min: 0.5
}
}
}
},
});
})();
</script>
Expand Down

0 comments on commit f96b699

Please sign in to comment.