Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.