Compare commits

...

2 Commits

Author SHA1 Message Date
4c77828d5a Adjust all legend for classic since there is less data 2024-04-12 05:29:54 -07:00
50787c1d83 Change the timescale legend to be more readable instead of dense
(cherry picked from commit 0c9e7ed183)
2024-04-12 05:28:30 -07:00

View File

@@ -86,6 +86,9 @@ function populateChart() {
size: 18, size: 18,
} }
}, },
time: {
unit: lookupTimeUnit(currentTimeSelection)
}
}, },
y: { y: {
ticks: { ticks: {
@@ -100,6 +103,17 @@ function populateChart() {
}); });
} }
function lookupTimeUnit(query){
const lookup = {
'h': 'day',
'd': 'week',
'm': 'month',
'y': 'month',
'l': 'month'
}
return lookup[query.charAt(query.length - 1)]
}
async function callUpdateURL() { async function callUpdateURL() {
let resp = await fetch("https://data.wowtoken.app/classic/token/current.json"); let resp = await fetch("https://data.wowtoken.app/classic/token/current.json");