Jump to content
Software FX Community

gantt chart


User (Legacy)
 Share

Recommended Posts

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

 Share

×
×
  • Create New...