Compare commits
2 Commits
09ec5f0d4d
...
4c77828d5a
Author | SHA1 | Date | |
---|---|---|---|
4c77828d5a | |||
50787c1d83 |
14
src/index.js
14
src/index.js
@ -86,6 +86,9 @@ function populateChart() {
|
||||
size: 18,
|
||||
}
|
||||
},
|
||||
time: {
|
||||
unit: lookupTimeUnit(currentTimeSelection)
|
||||
}
|
||||
},
|
||||
y: {
|
||||
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() {
|
||||
let resp = await fetch("https://data.wowtoken.app/classic/token/current.json");
|
||||
|
Loading…
Reference in New Issue
Block a user