> Yes! Here it is:
>>
>  
                chart = new 
google.visualization.LineChart(document.getElementById('chart_div'));
                $.ajax({
                    url:"/profile/ajaxGetSalesTickets/"+this.id,
                    method: "GET",
                    success:function(data){
                        if(data.length == 1)
                            data[1]=["",0];
                        data = self.mergeData(data);
                        data = google.visualization.arrayToDataTable(data);
                        chart.draw(data, self.options);
                    }
                });

So what it does is that it retrieve from the database all the tickets that 
have been sold in every transaction. 
The "mergeData" merge the transaction that happen the same day.
so the data that I pass to arrayToDataTable is this:
DATA 
generalStats.js:76<http://epasslive.local/assets/b7897fa3/js/stats/generalStats.js>
[Array[2], Array[2], Array[2]]

   1. 0: Array[2]
      1. 0: "Date"
      2. 1: "Quantité"
      3. length: 2
      4. __proto__: Array[0]
   2. 1: Array[2]
      1. 0: 28
      2. 1: 4
      3. length: 2
      4. __proto__: Array[0]
   3. length: 2
   4. __proto__: Array[0]

 

-- 
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/groups/opt_out.

Reply via email to