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.5We have start and end times for the meetings. The downside is that theclient needed to allow for meetings that overlap. For example meeting 1could be "9-11" and meeting 2 could be "10-12". That being said here iswhere 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 thatis passed in on the link. The P_ID is populated via a outer search that setsthe persons ID.[searchdb=schedules.db&eqS_DATEdatarq=[when]&S_DATEtype=date&eqP_IDdatarq=[id]&P_IDtype=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 allthe start-end times for the person searching for. The idea behind this wasto 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]][/interpret]) |([interpret][end[index]][/interpret]>[interpret][start[nextindex]][/interpret]))] [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 secondmeeting and compare them. If they over lap it should merge the data into thesecond meeting holder inside the array. It seems to work, but I still havethe original meeting inside the array.If I am going about this all wrong please let me know. Any assistance withthis 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:
Hi All,I am attempting to build a Gantt style chart for a client.System: Linux, Web 4.5We have start and end times for the meetings. The downside is that theclient needed to allow for meetings that overlap. For example meeting 1could be "9-11" and meeting 2 could be "10-12". That being said here iswhere 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 thatis passed in on the link. The P_ID is populated via a outer search that setsthe persons ID.[searchdb=schedules.db&eqS_DATEdatarq=[when]&S_DATEtype=date&eqP_IDdatarq=[id]&P_IDtype=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 allthe start-end times for the person searching for. The idea behind this wasto 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]][/interpret]) |([interpret][end[index]][/interpret]>[interpret][start[nextindex]][/interpret]))] [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 secondmeeting and compare them. If they over lap it should merge the data into thesecond meeting holder inside the array. It seems to work, but I still havethe original meeting inside the array.If I am going about this all wrong please let me know. Any assistance withthis 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:
Narrowing NT Crashing error (2000)
Re[2]: Next X hits (1996)
WebCat2 Append problem (B14Macacgi) (1997)
WebCatalog f2 Installation (1997)
shell problem (2003)
Subtotal Not Calculated on Invoice.html (1998)
Re1000001: Setting up shop (1997)
Emailer 1.01 bombs (1997)
I have observed and I am gone. (1998)
form crasehes server (1997)
Re(2): NT version and O'reily's WebSite (1997)
Some Questions (1997)
Setting up shop (1997)
Install Webcatalog under NT4.0 and Microsoft IIS 2.0 (1997)
mail on NT (1998)
ShowCart (2001)
BGcolor (1997)
Frames and WebCat (1997)
Re:need help please (1997)
The evolved Server Configuration Queston (2000)