Page 1 of 1

Format series title in stack-column charts

Posted: Tue Jan 30, 2007 6:54 pm
by jing
Hi,

I have 2 series on my stacked-column graph. I would like to format one of my series title to show more than just text.
I would like it to say "Capacity: 24GB", The capacity value I can get from a datafield.

So I put

Capacity {first(DiskDrives.Capacity)} in the title property of the series. The chart treats the whole thing as text...

How can I get around this?

thanks a lot

Format series title in stack-column charts

Posted: Wed Jan 31, 2007 1:13 am
by Edward
Please input the following text into Event Handler OnBeforePrint of the Chart component:

Code: Select all

DiskDrives.First;
Chart1.Series[0].Title = "Capacity: "+DiskDrives.Capacity;
Thank you.

Format series title in stack-column charts

Posted: Wed Jan 31, 2007 2:00 pm
by jing
thanks.

I have 3 series, each showing the usage of each disk drive. The chart is in a databand listing all disk drives. There are 3 of them (C:, D: and E:), the problem now is that the capacity title is correct for drive C: and E:, but incorrect for D:. D drive's capcity is the same as C drive, yet all 3 charts are correct....what's going on here?

thanks


Format series title in stack-column charts

Posted: Wed Jan 31, 2007 8:45 pm
by Vital
In this case use following code:

Code: Select all


DiskDrives.First;
int index = 0;

while (!DiskDrivers.IsEof)
{
    Chart1.Series[index++].Title = "Capacity: "+DiskDrives.Capacity;
    DiskDrivers.Next();
}
Thank you.