feat: more chart periods
This commit is contained in:
parent
3bad27b305
commit
cab278f102
8 changed files with 79 additions and 10 deletions
1
src/_data/json/scrobbles-one-year-chart.json
Normal file
1
src/_data/json/scrobbles-one-year-chart.json
Normal file
File diff suppressed because one or more lines are too long
1
src/_data/json/scrobbles-six-month-chart.json
Normal file
1
src/_data/json/scrobbles-six-month-chart.json
Normal file
File diff suppressed because one or more lines are too long
1
src/_data/json/scrobbles-three-month-chart.json
Normal file
1
src/_data/json/scrobbles-three-month-chart.json
Normal file
File diff suppressed because one or more lines are too long
|
@ -3,9 +3,15 @@ import { buildChart } from './helpers/music.js'
|
|||
|
||||
export default async function () {
|
||||
const monthChart = JSON.parse(await readFile('./src/_data/json/scrobbles-month-chart.json', 'utf8'));
|
||||
const threeMonthChart = JSON.parse(await readFile('./src/_data/json/scrobbles-three-month-chart.json', 'utf8'));
|
||||
const sixMonthChart = JSON.parse(await readFile('./src/_data/json/scrobbles-six-month-chart.json', 'utf8'));
|
||||
const oneYearChart = JSON.parse(await readFile('./src/_data/json/scrobbles-one-year-chart.json', 'utf8'));
|
||||
const artists = JSON.parse(await readFile('./src/_data/json/artists-map.json', 'utf8'));
|
||||
const albums = JSON.parse(await readFile('./src/_data/json/albums-map.json', 'utf8'));
|
||||
return {
|
||||
month: buildChart(monthChart['data'], artists, albums)
|
||||
month: buildChart(monthChart['data'], artists, albums),
|
||||
threeMonthChart: buildChart(threeMonthChart['data'], artists, albums),
|
||||
sixMonthChart: buildChart(sixMonthChart['data'], artists, albums),
|
||||
oneYearChart: buildChart(sixMonthChart['data'], artists, albums),
|
||||
}
|
||||
}
|
Reference in a new issue