Good afternoon,
I have the following problem, when I initialize my site it appears the graph nice but when I click to go to page it of the problem and does not show it.
The site is programmed in ajax so I only change one div. the following code is in one of these pages that I call with ajax.
This page I call the dashboard:
google.charts.load("current", {packages: ["corechart"]});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Usado', 'Liberado'],
['Usado', <?php echo $tamanho->USADO ?>],
['Liberado', <?php echo $tamanho->LIBERADO ?>]
]);
var options = {
title: 'Banco de dados',
is3D: true,
};
var chart = new google.visualization.PieChart(document.getElementById('piechart_3d'));
chart.draw(data, options);
}
In my index I include the following web directory:
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
When I open the chrome console, I am informed of the following error:
Uncaught Error: google.charts.load() cannot be called more than once with version 44 or earlier.
Searching the internet did not find anything concrete, but I noticed that it is something related to the amount of calls made. I did not believe it for obvious reasons that the changes did not work.
Does anyone know how to fix the problem?