Filtered out expansions in owned game list. Owned game statistic uses day steps
This commit is contained in:
parent
8036276187
commit
06e1599461
2 changed files with 7 additions and 6 deletions
|
|
@ -84,7 +84,7 @@ async function loadOwnedGames() {
|
|||
|
||||
var boardgame_datatable = new DataTable('.boardgame_table', {
|
||||
ajax: {
|
||||
url: api_url + '/owned',
|
||||
url: api_url + '/owned?filter_expansions_out=true',
|
||||
dataSrc: ''
|
||||
},
|
||||
columns: [
|
||||
|
|
@ -139,21 +139,22 @@ async function loadOwnedGames() {
|
|||
async function loadStatistics(){
|
||||
const overtimechart = document.getElementById("overtimechart")
|
||||
|
||||
games_over_time_statistic = await makeRequest(api_url + '/statistics/amount_of_games_over_time')
|
||||
games_over_time_statistic = await makeRequest(api_url + '/statistics/amount_of_games_over_time?day_step=30')
|
||||
|
||||
console.log(games_over_time_statistic)
|
||||
console.log(Object.keys(games_over_time_statistic.result))
|
||||
console.log(Object.values(games_over_time_statistic.result))
|
||||
|
||||
new Chart(overtimechart, {
|
||||
type: 'bar',
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: Object.keys(games_over_time_statistic.result),
|
||||
datasets: [{
|
||||
label: '# of Games',
|
||||
label: games_over_time_statistic.name,
|
||||
data: Object.values(games_over_time_statistic.result),
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card">
|
||||
<canvas id="overtimechart"></canvas>
|
||||
<div class="card-body">
|
||||
<h4 class="card-title" id="overtimechartname"></h4>
|
||||
|
|
|
|||
Loading…
Reference in a new issue