I have the following combo chart:
<div id="vendas_diarias" style="height: 500px;"></div>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script><scripttype="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawVisualization);
function drawVisualization() {
// Create the data table for Sarah's pizza.
var data = new google.visualization.DataTable();
data.addColumn('string', 'DATA');
data.addColumn('number', 'VENDAS');
data.addColumn('number', 'METAS');
data.addRows([
['<?php echo"$var_d01";?>',<?php echo"$var_vda_d01";?>,<?php echo"$var_mta_d01";?>],
['<?php echo"$var_d02";?>',<?php echo"$var_vda_d02";?>,<?php echo"$var_mta_d02";?>],
['<?php echo"$var_d03";?>',<?php echo"$var_vda_d03";?>,<?php echo"$var_mta_d03";?>],
['<?php echo"$var_d04";?>',<?php echo"$var_vda_d04";?>,<?php echo"$var_mta_d04";?>],
['<?php echo"$var_d05";?>',<?php echo"$var_vda_d05";?>,<?php echo"$var_mta_d05";?>],
['<?php echo"$var_d06";?>',<?php echo"$var_vda_d06";?>,<?php echo"$var_mta_d06";?>],
['<?php echo"$var_d07";?>',<?php echo"$var_vda_d07";?>,<?php echo"$var_mta_d07";?>],
['<?php echo"$var_d08";?>',<?php echo"$var_vda_d08";?>,<?php echo"$var_mta_d08";?>],
['<?php echo"$var_d09";?>',<?php echo"$var_vda_d09";?>,<?php echo"$var_mta_d09";?>],
['<?php echo"$var_d10";?>',<?php echo"$var_vda_d10";?>,<?php echo"$var_mta_d10";?>],
['<?php echo"$var_d11";?>',<?php echo"$var_vda_d11";?>,<?php echo"$var_mta_d11";?>],
['<?php echo"$var_d12";?>',<?php echo"$var_vda_d12";?>,<?php echo"$var_mta_d12";?>],
['<?php echo"$var_d13";?>',<?php echo"$var_vda_d14";?>,<?php echo"$var_mta_d13";?>],
['<?php echo"$var_d14";?>',<?php echo"$var_vda_d14";?>,<?php echo"$var_mta_d14";?>],
['<?php echo"$var_d15";?>',<?php echo"$var_vda_d15";?>,<?php echo"$var_mta_d15";?>],
['<?php echo"$var_d16";?>',<?php echo"$var_vda_d16";?>,<?php echo"$var_mta_d16";?>],
['<?php echo"$var_d17";?>',<?php echo"$var_vda_d17";?>,<?php echo"$var_mta_d17";?>],
['<?php echo"$var_d18";?>',<?php echo"$var_vda_d18";?>,<?php echo"$var_mta_d18";?>],
['<?php echo"$var_d19";?>',<?php echo"$var_vda_d19";?>,<?php echo"$var_mta_d19";?>],
['<?php echo"$var_d20";?>',<?php echo"$var_vda_d20";?>,<?php echo"$var_mta_d20";?>],
['<?php echo"$var_d21";?>',<?php echo"$var_vda_d21";?>,<?php echo"$var_mta_d21";?>],
['<?php echo"$var_d22";?>',<?php echo"$var_vda_d22";?>,<?php echo"$var_mta_d22";?>],
['<?php echo"$var_d23";?>',<?php echo"$var_vda_d23";?>,<?php echo"$var_mta_d23";?>],
['<?php echo"$var_d24";?>',<?php echo"$var_vda_d24";?>,<?php echo"$var_mta_d24";?>],
['<?php echo"$var_d25";?>',<?php echo"$var_vda_d25";?>,<?php echo"$var_mta_d25";?>],
['<?php echo"$var_d26";?>',<?php echo"$var_vda_d26";?>,<?php echo"$var_mta_d26";?>],
['<?php echo"$var_d27";?>',<?php echo"$var_vda_d27";?>,<?php echo"$var_mta_d27";?>],
['<?php echo"$var_d28";?>',<?php echo"$var_vda_d28";?>,<?php echo"$var_mta_d28";?>],
['<?php echo"$var_d29";?>',<?php echo"$var_vda_d29";?>,<?php echo"$var_mta_d29";?>],
['<?php echo"$var_d30";?>',<?php echo"$var_vda_d30";?>,<?php echo"$var_mta_d30";?>],
['<?php echo"$var_d31";?>',<?php echo"$var_vda_d31";?>,<?php echo"$var_mta_d31";?>]
]);
var options = {
title : 'VENDAS DIARIAS',
vAxis: {title: 'PERCENTUAL'},
hAxis: {title: 'DIAS'},
seriesType: 'bars',
series: {1: {type: 'line'}}
};
var chart = new google.visualization.ComboChart(document.getElementById('vendas_diarias'));
chart.draw(data, options);
}
</script>
Each line represents 1 day of the month, so it is necessary to display the lines until the current day, for example: As I am 23 today I need to display the line:
['<?php echo"$var_d01";?>',<?php echo"$var_vda_d01";?>,<?php echo"$var_mta_d01";?>],
Up the line:
['<?php echo"$var_d23";?>',<?php echo"$var_vda_d23";?>,<?php echo"$var_mta_d23";?>],
How could I do this?