Update Chart.js and change style for a more fitting one
This commit is contained in:
@ -50,6 +50,9 @@ jQuery(document).ready(function($)
|
||||
gatherYear(tens, 2010, 2020);
|
||||
}
|
||||
|
||||
Chart.defaults.font.family = "'Rubik', Helvetica";
|
||||
Chart.defaults.color = "#000000";
|
||||
|
||||
var canvasPhoto = document.getElementById("photo").getContext('2d');
|
||||
var chartPhoto = new Chart(canvasPhoto, {
|
||||
type: 'bar',
|
||||
@ -83,40 +86,60 @@ jQuery(document).ready(function($)
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
tooltips: {
|
||||
mode: 'index',
|
||||
intersect: false
|
||||
plugins: {
|
||||
tooltip: {
|
||||
mode: 'index',
|
||||
intersect: false,
|
||||
titleFont: {
|
||||
size: 14
|
||||
},
|
||||
bodyFont: {
|
||||
size: 14
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
display: false,
|
||||
position: "bottom",
|
||||
},
|
||||
},
|
||||
responsive: true,
|
||||
scales: {
|
||||
yAxes: [{
|
||||
y: {
|
||||
ticks: {
|
||||
font: {
|
||||
size: 14
|
||||
},
|
||||
beginAtZero: true
|
||||
}, gridLines: {
|
||||
display: true
|
||||
},
|
||||
scaleLabel: {
|
||||
grid: {
|
||||
lineWidth: 0
|
||||
},
|
||||
title: {
|
||||
display: true,
|
||||
labelString: 'Tableaux'
|
||||
text: 'Tableaux',
|
||||
font: {
|
||||
size: 16
|
||||
}
|
||||
},
|
||||
stacked: true,
|
||||
}],
|
||||
xAxes: [{
|
||||
gridLines: {
|
||||
display: false
|
||||
},
|
||||
x: {
|
||||
ticks: {
|
||||
font: {
|
||||
size: 14
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
lineWidth: 0
|
||||
},
|
||||
stacked: true,
|
||||
}]
|
||||
},
|
||||
legend: {
|
||||
display: false,
|
||||
position: "bottom",
|
||||
},
|
||||
},
|
||||
animation: {
|
||||
duration: 0
|
||||
},
|
||||
responsiveAnimationDuration: 0
|
||||
}
|
||||
responsiveAnimationDuration: 0,
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user