PHP: Help formatting Google (bar) charts

jonboys

New Member
I'm trying to make a horizontal bar chart with data from an array\[code\]$values = implode(',', array_values($type));$labels = implode('|', array_keys($type));$img = "http://chart.apis.google.com/chart?cht=bhg&chs=600x300&chd=t:{$values}&chxt=x,y&chtt=Ticket+Types&chxl=1:{$labels}&chts=676767,21.5";echo "<img src='http://stackoverflow.com/questions/3610408/{$img}' alt='Chart'>";\[/code\]This isn't giving me what I want to achieve but I'm having a hard to fixing it. The code above gives me a horizontal bar chart with the y labels as the number of row (i.e. the first label is 1, the second label is 2) and incorrect x numbers.I want the labels up the y axis and the values along the x.Can someone give me a hand?Jonesy
 
Back
Top