Page 1 of 1

Gantt chart over multiple pages

Posted: Tue Apr 06, 2004 4:18 pm
by 8573743
Hello, I have a long gantt chart that I want to send to a file (PDF, PNG, etc.), but as multiple pages. I know there is a maxpointsperpage, but this doesn't work with gantts because of their nature. "Points" on a gantt are actually bars that overlap each other (on purpose), and maxpointsperpage eliminate all the overlapping (which is the point of the chart).

It seems to me what is needed is a way to generated the chart, then output it in "n" (2, 4, 5, whatever) number of pages, independent of the number of points (on a gantt, one long point/bar may overlap three pages). Or put another way, given a chart/panel, say 4800 units long, have a way to define a "viewport" or sub canvas or something, say 1200 units long, and output/print just that section. For example, panel1.width := 4800, but output only 0-1199, then 1200-2399, then 2400-3599, then 3600-4799.

Maybe the simplest way to ask is: is there a way to output a definable section of a panel? (Don't stretch it, just clip it.) I don't mind digging into, and modifying, the code if I could be pointed to the right place to begin digging.

I'm using version 6. Thanks and regards.

Posted: Wed Apr 14, 2004 12:05 pm
by Marjan
Hi.

One solution might be to divide the bottom axis rangle in n equal sections and then use the bottom axis SetMinMax method to limit the region chart is displaying. Then use TChartAxis.SetMinMax to define chart section and export each "page" to pdf file.