mirror of
https://github.com/pi-hole/web.git
synced 2026-04-28 12:44:07 +01:00
Don't show rotation animation for pie chart updates
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
@@ -118,10 +118,10 @@ function updateQueryTypesPie() {
|
||||
queryTypePieChart.data.datasets[0] = dd;
|
||||
queryTypePieChart.data.labels = k;
|
||||
$("#query-types-pie .overlay").hide();
|
||||
queryTypePieChart.update();
|
||||
// Passing 'none' will prevent rotation animation for further updates
|
||||
//https://www.chartjs.org/docs/latest/developers/updates.html#preventing-animations
|
||||
queryTypePieChart.update('none');
|
||||
|
||||
// Don't use rotation animation for further updates
|
||||
//queryTypePieChart.options.animation.duration = 0;
|
||||
})
|
||||
.done(function () {
|
||||
// Reload graph after minute
|
||||
@@ -240,10 +240,12 @@ function updateForwardDestinationsPie() {
|
||||
forwardDestinationPieChart.data.datasets[0] = dd;
|
||||
// and push it at once
|
||||
$("#forward-destinations-pie .overlay").hide();
|
||||
forwardDestinationPieChart.update();
|
||||
|
||||
// Don't use rotation animation for further updates
|
||||
//forwardDestinationPieChart.options.animation.duration = 0;
|
||||
// Passing 'none' will prevent rotation animation for further updates
|
||||
//https://www.chartjs.org/docs/latest/developers/updates.html#preventing-animations
|
||||
queryTypePieChart.update('none');
|
||||
forwardDestinationPieChart.update('none');
|
||||
|
||||
})
|
||||
.done(function () {
|
||||
// Reload graph after one minute
|
||||
|
||||
Reference in New Issue
Block a user