From f96b6998319b29db859a681e4c09ca7dfa34a036 Mon Sep 17 00:00:00 2001 From: David Neilsen Date: Sat, 5 Sep 2020 13:50:11 +1200 Subject: [PATCH] Update ranking chart --- debug/rankings.php | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/debug/rankings.php b/debug/rankings.php index c30f564..4e3d82c 100644 --- a/debug/rankings.php +++ b/debug/rankings.php @@ -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), ]; } @@ -85,7 +85,7 @@ function readRankings($file) text: , }, animation: { - duration: 0 + duration: 0, }, tooltips: { mode: 'index', @@ -93,18 +93,18 @@ function readRankings($file) }, 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: [{ @@ -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 + } } - } + }, }); })();