Jump to content

Help with Graph


_spaz

Recommended Posts

Not sure if I'm in the right area, but does someone now how I would multi bar graph the below SQL query using Jpgraph's?  There's 6 buckets of cycle times grouped by weeks between a certain date period.  I would like each bucket to be represented by a different colored bar, like 0-day bar would be green, and the 16-20 bar would be red.....and so on.  Please point me in the right direction....thanks in advance.

 

SELECT

SUM(DATEDIFF(Release,Arrival) < 0) as Lessthan0,

SUM(DATEDIFF(Release,Arrival) =0) as 0day,

SUM(DATEDIFF(Release,Arrival) BETWEEN 1 and 5) as 1to5,

SUM(DATEDIFF(Release,Arrival) BETWEEN 6 and 10) as 6to10,

SUM(DATEDIFF(Release,Arrival) BETWEEN 11 and 15) as 11to15,

SUM(DATEDIFF(Release,Arrival) BETWEEN 16 and 20) as 16to20

FROM table WHERE Arrival>= '2009-11-01' and Arrival<= '2009-11-30' GROUP BY WEEK(Arrival,0)

Link to comment
https://forums.phpfreaks.com/topic/184364-help-with-graph/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.