Hi Wilson,

Please provide more information about your chart. It is unclear from the
code where the console.log statements are, or what your ToJavaScriptDate
function looks like. Also, please include the output of tdata.toJSON().

On Sun, May 17, 2015 at 1:26 PM Wilson Rogério Braun <[email protected]>
wrote:

> *Below the chart and code:*
>
> <https://lh3.googleusercontent.com/-0KQ1vnIaqBY/VVjOHjlPPqI/AAAAAAAAAZk/T05MBZGC_y4/s1600/chart.png>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> <script type="text/javascript">
>     var value;
>     google.load('visualization', '1.1', { 'packages': ['corechart'] });
>     google.setOnLoadCallback(function () { drawchart('') });
>     $(document).ready(function () {
>         value = $("#animal").val();
>         if (value != undefined) {
>             drawchart(value);
>         }
>         $("#animal").change(function () {
>             value = $(this).val();
>             drawchart(value);
>         });
>     });
>     function drawchart(codigo) {
>         var url = '/Programa_Parasito/Principal/IntervaloDosificacoes/' +
> codigo;
>         $.get(url, {},
>               function (data) {
>                   var tdata = new google.visualization.DataTable();
>                   tdata.addColumn('date', 'data_administracao');
>                   tdata.addColumn('number', 'intervalo');
>                   for (var i = 0; i < data.length; i++) {
>                       if (data[i].data_administracao != null)
>
> tdata.addRow([ToJavaScriptDate(data[i].data_administracao),
> parseInt(data[i].intervalo)]);
>                   }
>                   var options = {
>                       title: 'Intervalo entre dosificações',
>                       width: 700,
>                       height: 500,
>                       vAxis: { title: "Intervalo em dias", minValue: 15,
> viewWindow: { min: 10 } },
>                       hAxis: { title: "DATA", textStyle: { fontSize: 10 }
> },
>                       legend: { position: "none" }
>                   };
>                   var chart = new
> google.visualization.LineChart(document.getElementById('IntervaloDose'));
>                   chart.draw(tdata, options);
>               });
>     }
> </script>
>
> *The console returns:*
>
> 0Object {data_Administracao="/Date(1429326000000)/", ...}Intervalo0
> data_Administracao"/Date(1429326000000)/"1Object {data_Administracao=
> "/Date(1429930800000)/", ...}Intervalo7data_Administracao
> "/Date(1429930800000)/"
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization 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-visualization-api.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization 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-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to