Page 1 of 1
Pictures on Gantt Charts
Posted: Fri Sep 19, 2008 2:28 pm
by 15049298
In our project we have a gantt chart. Each Bar is standing for another Person with a special job. Now we need to add to the bars picture, every picture will stand for the persons job and the picture should be visible in the first quarter of a bar.
Is there a simple solution to reach this?
greetings
JD
Posted: Mon Sep 22, 2008 8:45 am
by Pep
Hello,
there's not a way to it automatically through methods and properties, but it can be accomplished by drawing directly onto the canvas using the Draw method. Here I show an example which draws an image into the first gantt bar :
Code: Select all
Private Sub TChart1_OnAfterDraw()
' This will add image for first gant....
TChart1.Canvas.Draw TChart1.Axis.Bottom.CalcXPosValue(TChart1.Series(0).XValues.Value(0)), _
TChart1.Axis.Left.CalcYPosValue(TChart1.Series(0).YValues.Value(0)) - _
TChart1.Series(0).asGantt.Pointer.VerticalSize / 2, _
Image1.Picture
End Sub
Posted: Mon Sep 29, 2008 1:50 pm
by 15049298
Works Great.
But now I have the problem that the images are also on the non charted area and I dont know how to use the ClipRectangle Function. Can you give just an example?
Posted: Mon Sep 29, 2008 1:53 pm
by narcis
Hi JD,
You'll find an example of ClipRectangle's usage
here.
Hope this helps!
Posted: Mon Sep 29, 2008 2:39 pm
by 15049298
Now it's working. But next Problem how can I make the Images on the Gantt transperance?
Posted: Mon Oct 06, 2008 7:39 am
by Pep
Hello,
I'm afraid this is not going to be possible, as the Draw method does not include transparency support. We'll add on our wish list to be considered for further releases.