Google Chart 2 Lines with not the same number of data
<p>I'm trying to create a dynamic Google Chart line.
I have 2 lines in a range of a day (from 00h00 to 23h50 - 0am to 12pm) with a point for each lines every 10 minutes (00h00, 00h10, 00h20 etc...). 
So for each lines I have 144 values for a day (1*6*24 - 6 / hours because I have 1 every 10 minutes).
For the first line, I have all the values at the start of the day (144 values) but for the other one, I'm drawing it according the current hour (exemple if it's 01:00 - 1am, I have only 6 values).</p>

<p>So i'm trying to draw the lines but I have a problem if my secondes lines doesn't have 144 values.</p>

<p>Here is the function to draw the chart with the different lines</p>

<pre><code>function drawChart(chart_div) {
var data = get_data();

var chart = new google.visualization.ComboChart(document.getElementById(chart_div));
chart.draw(data, {
    height: 300,
    width: 1000,
    chartArea:{left:40,top:5,width:"100%",height:"80%"},
    seriesType: 'line',
    series: {
        0: {
            color: '#0080FF'
        },
        1: {
            color: '#bdbdbd',
            enableInteractivity: false
        }
    },
    tooltip: {
        isHtml: true
    },
    legend: {
        position: 'none'
    },
    vAxis: {
        gridlines: {
            color: '#e5e5e1'
        }
    },
    hAxis: {
        viewWindow: {
            min: 0,
            max: 144
        },
        ticks: [0, 24, 48, 72, 96, 120, 144] // display labels every 24
    }
});}
</code></pre>

<p>Here is the code to launch the function to draw the chart</p>

<pre><code>google.load('visualization', '1', {'packages':['corechart']});
google.setOnLoadCallback(function() {
    drawChart("chart_one");
});
</code></pre>

<p>And here is the function to generate the data (They are currently randomly generate but I'll take them from DB later)</p>

<pre><code>function get_data(){
var data = new google.visualization.DataTable();
data.addColumn('string', 'Time');
data.addColumn('number', 'Heartbeat (%)');
data.addColumn('number', 'Heartbeat moy (%)');
var total = 0;
for(i = 0; i &lt; 24; i++){
    for(j=0; j &lt;= 5; j++){
        var num = "";
        if(i &lt; 10){
            num += "0";
        }
        if(total &lt; 98){
            data.addRows([[num + i + "h"+j+"0", Math.floor((Math.random() * 10) + 91), Math.floor((Math.random() * 10) + 91)]]);
        } else {
            data.addRows([[num + i + "h"+j+"0", "", Math.floor((Math.random() * 10) + 91)]]);
        }
        total++;
    }
}
return data;
}
</code></pre>

<p>So basically I would have something like that :</p>

<p><a href="https://i.stack.imgur.com/QfSuB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QfSuB.png" alt="Google chart"></a></p>

<p>But if I'm setting the secondes line values to "", it say</p>

<blockquote>
  <p>Error: Type mismatch. Value  does not match type number in column index 2</p>
</blockquote>

<p>Does anyone have any idea how to bypass the value for the seconde lines if I doesn't have it ?</p>