Remove initial animation from charts

This commit is contained in:
Théo Marchal 2022-08-04 18:38:18 +02:00
parent 67b9847587
commit aa3e4ffded
2 changed files with 22 additions and 6 deletions

View File

@ -50,8 +50,8 @@ jQuery(document).ready(function($)
gatherYear(tens, 2010, 2020);
}
var canvasDimension = document.getElementById("photo").getContext('2d');
var chartDimension = new Chart(canvasDimension, {
var canvasPhoto = document.getElementById("photo").getContext('2d');
var chartPhoto = new Chart(canvasPhoto, {
type: 'bar',
data: {
labels: ["1956 - 1959", "1960 - 1969", "1970 - 1979", "1980 - 1989", "1990 - 1999", "2000 - 2009", "2010 - 2016"],
@ -111,7 +111,11 @@ jQuery(document).ready(function($)
legend: {
display: false,
position: "bottom",
}
},
animation: {
duration: 0
},
responsiveAnimationDuration: 0
}
});
});

View File

@ -34,7 +34,11 @@ jQuery(document).ready(function($)
},
legend: {
display: false
}
},
animation: {
duration: 0
},
responsiveAnimationDuration: 0
}
});
@ -72,7 +76,11 @@ jQuery(document).ready(function($)
},
legend: {
display: false
}
},
animation: {
duration: 0
},
responsiveAnimationDuration: 0
}
});
@ -110,7 +118,11 @@ jQuery(document).ready(function($)
},
legend: {
display: false
}
},
animation: {
duration: 0
},
responsiveAnimationDuration: 0
}
});
});