Hello, i have the this code:
<html>
<head>
<script type="text/javascript"
src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['0','Avance Programado','Avance Real'],
['1',0,0],
['2',11,10],
['3',34,20],
['4',34,30],
['5',34,30],
['6',57,36],
['7',80,*36*],
['8',95,*36*],
['9',99,*36*],
['10',100,*36*]
]);
var options = {
title: 'Avance Programado / Real',
width: 1200,
height: 600,
vAxis: {gridlines: {color: '#333', count:10},title:'% Avance',minValue:0},
hAxis: {title:'Semanas'},
pointSize: '3', //Ancho del punto
legend: {position: 'right', textStyle: {color: 'blue', fontSize: 16}},
lineWidth: 1, //Ancho de linea
reverseCategories:false, //Invertir el orden del grafico
//tooltip:{isHtml:true,textStyle: {color: '#FF0000'}, showColorCode: true},
series: {0:{color: 'blue'}, 1:{color: 'red'}}
};
var chart = new
google.visualization.LineChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="chart_div" style="width: 900px; height: 500px;"></div>
</body>
</html>
I need the series "Real Progress" only has six values, but if I do this:
['0','Avance Programado','Avance Real'],
['1',0,0],
['2',11,10],
['3',34,20],
['4',34,30],
['5',34,30],
['6',57,36],
['7',80],
['8',95],
['9',99],
['10',100]
Show This Error: SCRIPT5022: Not a valid 2D array.
I need it like this:
<https://lh4.googleusercontent.com/-lwV2ai1nVS8/UebKwEdZHbI/AAAAAAAABDI/H5AVNVsNPjE/s1600/Graphic.png>
--
You received this message because you are subscribed to the Google Groups
"Google Chart API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-chart-api.
For more options, visit https://groups.google.com/groups/opt_out.