User (Legacy) Posted December 2, 2002 Report Share Posted December 2, 2002 Does anyone have any sample code that points to making a stacked gantt chart via chartfx IE? I currently have working code but I'm having a few issues with it. 'here's the code the sets up the graph. I set the stacked property to chart_stacked because i 'want the bars in the gantt chart to be multicolored (this may be the source of my problem) Set chart = Server.CreateObject("ChartFX.WebServer") chart.RgbBk = RGB(255,255,255) 'white background - important to mask forth data series. Chart.ChartType = GANTT Chart.Chart3D = False Chart.Stacked = CHART_STACKED 'make stacked bar chart Chart.Axis(AXIS_Y).Format = AF_DATE 'make y axis date 'open the recordset and dataex stuff projrs.cursorlocation = 3 projrs.Open sql, projconn count = projrs.recordcount Chart.OpenDataEx COD_VALUES,1,1 Chart.OpenDataEX COD_INIVALUES,1,1 Chart.Axis(AXIS_X).Label(i) = projrs("projcode") 'for Loop goes through the following to set up each data record 'sets up the beginning middle and end parts of the gantt bars. the last group is a white bar to simulate emptiness in the chart. Chart.iniValueex(0,i) = start Chart.Valueex(0,i) = middle Chart.iniValueex(1,i) = middle Chart.Valueex(1,i) = endd 'used to blank out part of chart. I put this here to fix the issue Chart.iniValueex(2,i) = endd Chart.Valueex(2,i) = enddate My problem is that for some reason the last value of the last series will always extend to the end of the graph. I'm not sure if this is a default property of the Chart_Stacked value. I had to jury rig the code with the last part that enters in a white line in place of the last series. However, now my client wants vertical lines (via standard chartfx toolbar) and the lines are cut by the last blank white line. Point values are also messed up with this fix. Does anyone know how to get around this problem? I can explain it more if need be. Link to comment Share on other sites More sharing options...
User (Legacy) Posted December 2, 2002 Author Report Share Posted December 2, 2002 Never mind..I just found a doc that helped me solve the problem using the cluster property instead of the stacked.. "Jason Gleason" <jason.gleason@gensurvey.com> wrote in message news:sp3H6kimCHA.1060@webserver1.softwarefx.com... > Does anyone have any sample code that points to making a stacked gantt chart > via chartfx IE? I currently have working code but I'm having a few issues > with it. > > 'here's the code the sets up the graph. I set the stacked property to > chart_stacked because i > 'want the bars in the gantt chart to be multicolored (this may be the source > of my problem) > > Set chart = Server.CreateObject("ChartFX.WebServer") > chart.RgbBk = RGB(255,255,255) 'white background - important to mask forth > data series. > Chart.ChartType = GANTT > Chart.Chart3D = False > Chart.Stacked = CHART_STACKED 'make stacked bar chart > Chart.Axis(AXIS_Y).Format = AF_DATE 'make y axis date > > 'open the recordset and dataex stuff > projrs.cursorlocation = 3 > projrs.Open sql, projconn > count = projrs.recordcount > > Chart.OpenDataEx COD_VALUES,1,1 > Chart.OpenDataEX COD_INIVALUES,1,1 > > Chart.Axis(AXIS_X).Label(i) = projrs("projcode") > > 'for Loop goes through the following to set up each data record > 'sets up the beginning middle and end parts of the gantt bars. the last > group is a white bar to simulate emptiness in the chart. > Chart.iniValueex(0,i) = start > Chart.Valueex(0,i) = middle > > Chart.iniValueex(1,i) = middle > Chart.Valueex(1,i) = endd > > 'used to blank out part of chart. I put this here to fix the issue > Chart.iniValueex(2,i) = endd > Chart.Valueex(2,i) = enddate > > > My problem is that for some reason the last value of the last series will > always extend to the end of the graph. I'm not sure if this is a default > property of the Chart_Stacked value. I had to jury rig the code with the > last part that enters in a white line in place of the last series. However, > now my client wants vertical lines (via standard chartfx toolbar) and the > lines are cut by the last blank white line. Point values are also messed up > with this fix. Does anyone know how to get around this problem? I can > explain it more if need be. > > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.