Skip to content

Commit

Permalink
embed fix
Browse files Browse the repository at this point in the history
  • Loading branch information
desafinadude committed Dec 2, 2024
1 parent 5de9023 commit 6c64eb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,9 @@ document.addEventListener('DOMContentLoaded', function () {
},
};


if (population_chart) {
population_chart.destroy(); // destroy the previous chart if it exists
}
const population_chart_ctx = document.getElementById('population-chart').getContext('2d');
population_chart = new Chart(population_chart_ctx, {
type: 'bar',
Expand Down

0 comments on commit 6c64eb0

Please sign in to comment.