ginou/scripts/stats.js

128 lines
3.8 KiB
JavaScript
Raw Normal View History

jQuery(document).ready(function($)
{
2021-01-09 00:11:40 +00:00
var canvasMonth = document.getElementById("month").getContext('2d');
var chartMonth = new Chart(canvasMonth, {
type: 'bar',
data: {
labels: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"],
datasets: [{
label: 'nombre de tableaux',
data: [11, 30, 40, 34, 50, 33, 27, 24, 17, 26, 37, 19],
2021-01-09 00:11:40 +00:00
backgroundColor: '#2589BD',
borderColor: '#187795',
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
2021-01-09 00:11:40 +00:00
}, gridLines: {
display: false
2021-01-09 00:11:40 +00:00
},
scaleLabel: {
display: true,
labelString: 'Tableaux'
}
}],
xAxes: [{
gridLines: {
display: false
2021-01-09 00:11:40 +00:00
}
}]
},
legend: {
display: false
2022-08-04 16:38:18 +00:00
},
animation: {
duration: 0
},
responsiveAnimationDuration: 0
2021-01-09 00:11:40 +00:00
}
});
var canvasYear = document.getElementById("year").getContext('2d');
var chartYear = new Chart(canvasYear, {
2021-01-09 00:11:40 +00:00
type: 'bar',
data: {
labels: ["1956 - 1959", "1960 - 1969", "1970 - 1979", "1980 - 1989", "1990 - 1999", "2000 - 2009", "2010 - 2016"],
2021-01-09 00:11:40 +00:00
datasets: [{
label: 'nombre de tableaux',
data: [24, 16, 7, 57, 117, 112, 52],
2021-01-09 00:11:40 +00:00
backgroundColor: '#2589BD',
borderColor: '#187795',
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
2021-01-09 00:11:40 +00:00
}, gridLines: {
display: false
2021-01-09 00:11:40 +00:00
},
scaleLabel: {
display: true,
labelString: 'Tableaux'
}
}],
xAxes: [{
gridLines: {
display: false
2021-01-09 00:11:40 +00:00
}
}]
},
legend: {
display: false
2022-08-04 16:38:18 +00:00
},
animation: {
duration: 0
},
responsiveAnimationDuration: 0
2021-01-09 00:11:40 +00:00
}
});
var canvasDimension = document.getElementById("dimension").getContext('2d');
var chartDimension = new Chart(canvasDimension, {
2021-01-09 00:11:40 +00:00
type: 'bar',
data: {
2021-03-07 00:06:12 +00:00
labels: ["Histoire", "Nature morte", "Paysage", "Portrait", "Scène"],
2021-01-09 00:11:40 +00:00
datasets: [{
label: 'nombre de tableaux',
2021-03-07 00:06:12 +00:00
data: [2, 42, 173, 59, 107],
2021-01-09 00:11:40 +00:00
backgroundColor: '#2589BD',
borderColor: '#187795',
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
2021-01-09 00:11:40 +00:00
}, gridLines: {
display: false
2021-01-09 00:11:40 +00:00
},
scaleLabel: {
display: true,
labelString: 'Tableaux'
}
}],
xAxes: [{
gridLines: {
display: false
2021-01-09 00:11:40 +00:00
}
}]
},
legend: {
display: false
2022-08-04 16:38:18 +00:00
},
animation: {
duration: 0
},
responsiveAnimationDuration: 0
2021-01-09 00:11:40 +00:00
}
});
});