Os gráficos são desenhados corretamente no html, porém fica esse erro no console.
VM6537:108 Uncaught Error: Container is not defined
/*Graficos*/
google.charts.load('current', {packages: ['corechart']});
google.charts.setOnLoadCallback(drawChartTicketsByClient);
function drawChartTicketsByClient() {
var jsonData = $.ajax({
url: "/client/ajax",
dataType: "JSON",
async: false
}).responseJSON;
var dataArray = [
['Name', 'Tickets'],
];
for (var i = 0; i < jsonData.length; i++) {
var row = [jsonData[i].Name, jsonData[i].Tickets];
dataArray.push(row);
}
var options = {
title: 'Tickets por cliente',
curveType: 'function',
series:{0 :{"color":'#57c8f2'}}
};
var data = google.visualization.arrayToDataTable(dataArray);
var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
//**************************//
google.charts.setOnLoadCallback(drawChartTicketsByType);
function drawChartTicketsByType() {
var jsonData = $.ajax({
url: "/ticket/ajax",
dataType: "JSON",
async: false
}).responseJSON;
var dataArray = [
['Description', 'Tickets'],
];
for (var i = 0; i < jsonData.length; i++) {
var row = [jsonData[i].Description, jsonData[i].Tickets];
dataArray.push(row);
}
var options = {
title: 'Tickets por tipo',
curveType: 'function',
series:{0 :{"color":'#E9D460'}}
};
var data = google.visualization.arrayToDataTable(dataArray);
var chart = new google.visualization.LineChart(document.getElementById('chart_div_ticket'));
chart.draw(data, options);
}
//**************************//
google.charts.setOnLoadCallback(drawChartTicketsByTerm);
function drawChartTicketsByTerm() {
var jsonData = $.ajax({
url: "/ticket/term-on/ajax",
dataType: "JSON",
async: false
}).responseJSON;
var dataArray = [
['Name', 'Tickets'],
['No prazo', jsonData[0][0].Tickets],
['Fora do prazo', jsonData[1][0].Tickets],
];
var options = {
title: 'Tickets por prazo',
curveType: 'function',
series:{0 :{"color":'#57c8f2'},
1: {"color": '#ff6c60'}}
};
var data = google.visualization.arrayToDataTable(dataArray);
var chart = new google.visualization.PieChart(document.getElementById('chart_div_ticket_term'));
chart.draw(data, options);
}
Alguém sabe dizer o que pode ser?
Container
nesse código. Qual é a linha108
?