Because in the code the line graph when there is no data the line goes down 
to zero, instead of following the trend of the previous values?
  <script type="text/javascript" 
src="https://www.gstatic.com/charts/loader.js";></script>
    <script type="text/javascript" 
src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script type="text/javascript">
    var value;
    google.charts.load('current', { packages: ['table', 'corechart'] });
    google.charts.setOnLoadCallback(function () { drawtable('') });
    google.charts.setOnLoadCallback(function () { drawChart('') });
    $(document).ready(function () {
        value = $("#animal").val();
        if (value != undefined) {
            drawtable(value);
        }
        $("#animal").change(function () {
            value = $(this).val();
            drawtable(value);
        });
    });

 var url = '/Programa_Nutricao/Principal/EvolucaoTemperatura/' + codigo;
        $.get(url, {},
              function (data) {
                  var tdata = new google.visualization.DataTable();
                  tdata.addColumn('date', 'data_atividade');
                  tdata.addColumn('number', 'Temp. Corporal');
                  tdata.addColumn('number', 'Temp. Retal');
                  for (var i = 0; i < data.length; i++) {
                      if (data[i].data_atividade != null)
                          
tdata.addRow([ToJavaScriptDate(data[i].data_atividade), 
parseFloat(data[i].temperaturaCorporal), 
parseFloat(data[i].temperaturaRetal)]);
                  }
                  var options = {
                      width: 700,
                      height: 500,
                      vAxis: { title: "Temperatura ºC", minValue: '30', 
maxValue: '45' },
                      hAxis: { title: "DATA", textStyle: { fontSize: 10 } },
                      legend: { position: 'bottom' },
                      curveType: 'function',
                      interpolateNulls: true
                  };
                  var chart = new 
google.visualization.LineChart(document.getElementById('EvolucaoTemperatura'));
                  chart.draw(tdata, options);
              });

-- 
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 google-chart-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-chart-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-chart-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to