Actually I am trying to do a graph chart for all reports for that am using jQChart plugins. I have done the graph report by PHP but my head need that report with animation so I go to jQChart but I don't know how to pass the assoc array values to Ajax.
$results = mysql_query("SELECT vaccum_value,date FROM vaccum_details where serial_number='10P1005'");
$data1=array();
while ($row = mysql_fetch_array($results))
{
$data1[$row['date']]=$row['vaccum_value'];
}
$data = Array ( "28-Sep-2012" => 31.6, "04-Oct-2012" => 0.99, "03-Oct-2012" => -3 );
but I need to pass this result to Ajax and then convert to like this below:
data: [['28-Sep-2012', 31.6], ['04-Oct-2012', 0.99], ['03-Oct-2012', -3]]
Detailed Script for your reference:
<script lang="javascript" type="text/javascript">
$(document).ready(function () {
$('#jqChart').jqChart({ title: { text: 'Animation' }, animation: { delayTime: 1, duration: 2 }, series: [ { type: 'line', title: 'Line', data: [['A', 69], ['B', 57], ['C', 86], ['D', 23], ['E', 70], ['F', 60], ['D', 88], ['H', 22]] } ] }); });
</script>