I use Google Chart
to generate graphics. I have array
with values from 1 to 4. These values are of type int
. I need to change the description of the Y axis. To:
1 = Great, 2 = Good, 3 = Regular, 4 = Bad.
Iwouldlikeittolooklikethis:
google.charts.load('current', {'packages': ['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Pergunta', 'Valor 1', 'Valor 2'],
['Pergunta 1', 2, 3],
['Pergunta 2', 4, 1],
['Pergunta 3', 1, 1]
]);
var options = {
height: 600
};
var chart = new google.visualization.LineChart(document.getElementById('grafico'));
chart.draw(data, options);
}