PDA

View Full Version : Varchart xgantt


melanie.albury
Aug 12, 2004, 07:49 AM
I'm very confused...

I have installed the demo for the VARCHART XGantt ActiveX Control VB Add-In, and all is going fine in that I have managed to get the chart to display my data, showing the project names and bars.

However as soon as I press run, all of the data disappears and I get a blank chart. I am very new to programming and so have no idea if I am meant to include some code (I'm using Visual Basic 6.0) to make it all magically appear. But the surprising thing for me is that when I stop the program the chart is still blank and I have to re-connect it to the data.

Also, on a slightly more trivial note, how do I change the colours of the bars?

Thank you very much!

SHermann73
Sep 20, 2004, 05:21 AM
I luvfrenchflair,
I think you managed to get your data displayed in the chart by opening your datafile through the property pages of the xgantt control. This is no connection to your data! When you open a datafile through the property pages the data is only inserted temporarily in the chart, to see how it looks like when you run your program.
It load the data in the chart at runtime of your program, you have to insert
VcGantt1.Open ("YourDataFile.csv")
in your code. This command will load the data in the chart when your program is running.
To change the colour of your bars, you have to create a "layer" and set a "map" at the background colour of the layer. With this map you can control the colour of your layer by the value of an datafield of your data.

Hope this helps!

melanie.albury
Sep 20, 2004, 06:01 AM
Thank you very much, that was exactly what I was looking for!

Much appreciated. ::)