Hi, i need use two independient data in same annotation chart.
I did the following:

function drawChart() {
        var data = new google.visualization.DataTable();
        data.addColumn('datetime', 'Date');
        data.addColumn('number', 'Registrador');
        data.addColumn('number', 'Sonografo');
        
        {% for s in sonografo %}
                data.addRow([new Date({{s.fechaInicioSesionAux}}), undefined
, undefined]);
                data.addRow([new Date({{s.fechaInicioSesion}}), undefined, 
10]);
                data.addRow([new Date({{s.final}}), undefined, 10]);
        {% endfor %}


        data.addRows([
          {% for r in registrador %}
                {% if r.medida != 0%}
                        [new Date({{r.sesion_detalle}}), {{r.medida}}, 
undefined],
                {% else %}
                        [new Date({{r.sesion_detalle}}), undefined, 
undefined],
                {% endif %}
          {% endfor %}
        ]);
        var chart = new google.visualization.AnnotationChart(document.
getElementById('chart_div'));


        var options = {
          displayAnnotations: false,
          colors: ['#4cae4c', '#664B8E'],
          thickness: 3,//Grosor de las lineas
          max: 130,//Valor maximo a verse en la grafica
          min: 0//Valor minimo a verse en la grafica
        };


        chart.draw(data, options);
      }

I need to work independently, because if the date of "registrador" data is 
between s.fechaInicioSesion and s.final, this breaks my "sonografo" line, 
putting his undefined value.

How can I do so that I do not happen?

-- 
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.
  • [visualization-api] Two da... Ivan Javier Barranco Gavilan

Reply via email to