Gantt style chart

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 58522
interpreted = N
texte = Hi All, I am attempting to build a Gantt style chart for a client. System: Linux, Web 4.5 We have start and end times for the meetings. The downside is that the client needed to allow for meetings that overlap. For example meeting 1 could be "9-11" and meeting 2 could be "10-12". That being said here is where I have gotten to. Displaying 7am - 6pm in 30 minute blocks. Storing the times as military numbers (9am = 900, 1pm=1300) Manually built variables for indexing: [!] --------------------------- 7:00 --------------------------- [/!] [text]700=1[/text] [text]705=1[/text] [text]710=1[/text] [text]715=1[/text] [text]720=1[/text] [text]725=1[/text] [text]730=2[/text] [text]735=2[/text] [text]740=2[/text] [text]745=2[/text] [text]750=2[/text] [text]755=2[/text] This variable system lets me know if the meeting is 7-7:25 I fill cell one. If the meeting is 7:30-8 to fill cell two. I then do a search on the schedule.db where the when variable is a date that is passed in on the link. The P_ID is populated via a outer search that sets the persons ID. [search db=schedules.db&eqS_DATEdatarq=[when]&S_DATEtype=date&eqP_IDdatarq=[id]&P_ID type=number&asS_TIMEsort=1&S_TIMEtype=num] [founditems] [math show=f]count=[index][/math] [math show=f]start[index]=[s_time][/math] [math show=f]end[index]=[e_time][/math] [/founditems] In the founditems I build a counter and an array (sort of) that holds all the start-end times for the person searching for. The idea behind this was to allow me to loop through the array and compare the times. [loop start=1&end=[count]] [math show=f]nextindex=[index]+1[/math] [If (([interpret][end[index]][/interpret]=[interpret][start[nextindex]][/interpr et]) | ([interpret][end[index]][/interpret]>[interpret][start[nextindex]][/interpre t]))] [Then] [text]start[nextindex]=[interpret][start[index]][/interpret][/text] [If (([interpret][end[nextindex]][/interpret]<[interpret][end[index]][/interpret ]))] [Then] [text]end[nextindex]=[interpret][end[index]][/interpret][/text] [/Then] [/If] [/Then] [/If] [/loop] This is the part I am stuck on. This actually will take the first and second meeting and compare them. If they over lap it should merge the data into the second meeting holder inside the array. It seems to work, but I still have the original meeting inside the array. If I am going about this all wrong please let me know. Any assistance with this is greatly appreciated. Sincerely, RonnyMc ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Gantt style chart ( Patrick McCormick 2004)
  2. Re: Gantt style chart ( "WebDna @ Inkblot Media" 2004)
  3. Re: Gantt style chart ( Gary Krockover 2004)
  4. Re: Gantt style chart ( "WebDna @ Inkblot Media" 2004)
  5. Re: Gantt style chart ( Patrick McCormick 2004)
  6. Gantt style chart ( "WebDna @ Inkblot Media" 2004)
Hi All, I am attempting to build a Gantt style chart for a client. System: Linux, Web 4.5 We have start and end times for the meetings. The downside is that the client needed to allow for meetings that overlap. For example meeting 1 could be "9-11" and meeting 2 could be "10-12". That being said here is where I have gotten to. Displaying 7am - 6pm in 30 minute blocks. Storing the times as military numbers (9am = 900, 1pm=1300) Manually built variables for indexing: [!] --------------------------- 7:00 --------------------------- [/!] [text]700=1[/text] [text]705=1[/text] [text]710=1[/text] [text]715=1[/text] [text]720=1[/text] [text]725=1[/text] [text]730=2[/text] [text]735=2[/text] [text]740=2[/text] [text]745=2[/text] [text]750=2[/text] [text]755=2[/text] This variable system lets me know if the meeting is 7-7:25 I fill cell one. If the meeting is 7:30-8 to fill cell two. I then do a search on the schedule.db where the when variable is a date that is passed in on the link. The P_ID is populated via a outer search that sets the persons ID. [search db=schedules.db&eqS_DATEdatarq=[when]&S_DATEtype=date&eqP_IDdatarq=[id]&P_ID type=number&asS_TIMEsort=1&S_TIMEtype=num] [founditems] [math show=f]count=[index][/math] [math show=f]start[index]=[s_time][/math] [math show=f]end[index]=[e_time][/math] [/founditems] In the founditems I build a counter and an array (sort of) that holds all the start-end times for the person searching for. The idea behind this was to allow me to loop through the array and compare the times. [loop start=1&end=[count]] [math show=f]nextindex=[index]+1[/math] [If (([interpret][end[index]][/interpret]=[interpret][start[nextindex]][/interpr et]) | ([interpret][end[index]][/interpret]>[interpret][start[nextindex]][/interpre t]))] [Then] [text]start[nextindex]=[interpret][start[index]][/interpret][/text] [If (([interpret][end[nextindex]][/interpret]<[interpret][end[index]][/interpret ]))] [Then] [text]end[nextindex]=[interpret][end[index]][/interpret][/text] [/Then] [/If] [/Then] [/If] [/loop] This is the part I am stuck on. This actually will take the first and second meeting and compare them. If they over lap it should merge the data into the second meeting holder inside the array. It seems to work, but I still have the original meeting inside the array. If I am going about this all wrong please let me know. Any assistance with this is greatly appreciated. Sincerely, RonnyMc ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ "WebDna @ Inkblot Media"

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Customer login feature (2004) Comments in db? (1997) Not really WebCat- (1997) SiteEdit NewFile.html ? (1997) OT: Site Downloaders (2002) WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997) [WebDNA] =?windows-1252?Q?Re=3A_=5BWebDNA=5D_=5BWebDNA=5D_Re=3A_=5BWebDNA?= (2012) webcat/webmerchant docs (1997) [date] +1 (1999) [WebDNA] Using reCaptcha and Saving Form Data (2013) Re:no [search] with NT (1997) Date Formats (1997) FCKeditor (2008) Grant, please help me ... (1997) Chown www:wheel Almost There WebCat 5 on itools 7 (2003) Trigger date/month/year setting question (2002) Displaying photo attached to first record (1997) [ReturnRaw] and hiding FORM data (2003) Email Newsletters [OT] (2003) Counting downloads (1998)