With my jpgraph libraries, I would do a mysql search, and store my timestamps in an array and my tank levels in another. I'm sure it's elementary, but the form that the examples show for Google Line graphs is a two dimensional array. My graph should only need these two sets of values. How can I change these two arrays into the form I need? Also, I am trying to use these php variables inside the javascript, and it is also giving me trouble.
$data()=array[5,6,5.5,4,4,4,4,...] $dataX()=array[1437609600,1437609800,143761000,...] Then dataX is being changed into a date/time format with date function... $dataX()=array['July 25, 2015 7:00',...,...] All of this works, because I've been using jpgraph successfully to look at this data on my webpage. However, this is the form it requires: var data = new google.visualization.DataTable(); data.addColumn('number', 'Day'); data.addColumn('number', 'Guardians of the Galaxy'); data.addColumn('number', 'Something Else'); data.addColumn('number', 'Something Else Entirely'); data.addRows([ [1, 37.8, 80.8, 41.8], [2, 30.9, 69.5, 32.4], [3, 25.4, 57, 25.7], [4, 11.7, 18.8, 10.5], [5, 11.9, 17.6, 10.4], [6, 8.8, 13.6, 7.7], [7, 7.6, 12.3, 9.6], [8, 12.3, 29.2, 10.6], [9, 16.9, 42.9, 14.8], [10, 12.8, 30.9, 11.6], [11, 5.3, 7.9, 4.7], [12, 6.6, 8.4, 5.2], [13, 4.8, 6.3, 3.6], [14, 4.2, 6.2, 3.4] ]); I know I only need two columns. I'm presuming that the first column should be changed from 'number' to some other type like string? I already have all of the data I need, I just know I am having a problem putting it in the right form. Any help is appreciated. -- 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 google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.