I am trying to draw a Google Line Chart, where each line may have a different number of data points. That is, if the x-Axis has 10 values, then some lines may only have data on 4 or 5 or whatever points. I found an answer to this question here:
How to create Google Chart with lines (series) of different lengths?
This did not work for me. I tried both underscore and double underscore. Also I tried to add " and ' around the underscore(s). But when I open the html, the site remains plain. Here is my 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 = new google.visualization.DataTable();
data.addColumn('string', 'point');
data.addColumn('number', 'line1');
data.addColumn('number', 'line2');
data.addColumn('number', 'line3');
data.addColumn('number', 'line4');
data.addColumn('number', 'line5');
data.addRows([
['0', 5, 6, 10, 8,_],
['1', 5, 6, 10, 8, 10]]);
var options = {
title: 'Test'
};
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>
Anyone know a solution?