23.02.2021, 08:50
The problem is that chart does not render properly when it's drawn in a hidden element (plan).
You can listen to the "showplan" event and draw charts only when the containing plan becomes visible like this:
You can listen to the "showplan" event and draw charts only when the containing plan becomes visible like this:
Code:
google.charts.load('current', {'packages':['gauge', 'corechart'],language: 'es'});
$('body').on('showplan', function(event, id) {
if (id == 21) {
google.charts.setOnLoadCallback(drawGraphBC);
}
else if (id == 24) {
google.charts.setOnLoadCallback(drawSolcast);
}
}).trigger('showplan', [ currentPlanId ]);
//------------------------------------------------------------------------------------------------