From 178dd871ae5530aaaffa9d3d14b7ea2f0e3eeb5e Mon Sep 17 00:00:00 2001 From: Emily Doherty Date: Sun, 13 Jun 2021 12:15:58 -0400 Subject: [PATCH] Update libraries, prefetch data immediately --- css/style.css | 5 +++++ index.html | 18 +++++++++++------- js/token.js | 14 +++++++++----- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/css/style.css b/css/style.css index 12fd3a3..f3deb56 100644 --- a/css/style.css +++ b/css/style.css @@ -319,6 +319,11 @@ h6 { line-height: 75px; font-size: 30px; } +p { + margin: 0px; + padding: 0px; + line-height: 3em; +} #option_select { diff --git a/index.html b/index.html index c5fb620..c97ac43 100644 --- a/index.html +++ b/index.html @@ -5,13 +5,15 @@ - - + + - - - - + + + + + + @@ -26,7 +28,9 @@ EU KR TW - | Time Selection: +

+

+ Time Selection: 2d 3d 5d diff --git a/js/token.js b/js/token.js index 88c5c4f..d5208ca 100644 --- a/js/token.js +++ b/js/token.js @@ -20,15 +20,18 @@ function populateChart() { datasets: [{ borderColor: 'gold', label: current_region_selection.toUpperCase() + " WoW Token Price", - data: chart_js_data + data: chart_js_data, + cubicInterpolationMode: 'monotone', + pointRadius: 0 }] }, options: { scales: { - xAxes: [{ - type: 'time' - }] - } + x: { + type: 'time', + + } + }, } }) } @@ -96,6 +99,7 @@ function formatToken() { $("#token").html(current_price_hash[current_region_selection].toLocaleString()); } + $(document).ready(function() { callUpdateURL() setInterval(callUpdateURL, 60*1000);