Page 1 of 1

Control Gantt Chart Size Progmatically

Posted: Thu Feb 10, 2005 3:28 pm
by 9524644
I'm using TeeChart 7.0.0.2 with VFP 9. I have a Gantt chart that contains
multiple series. How can I progmatically control the initial size of the
chart allowing the user to scroll up/down/left/right?

For instance, let's say my data sources generate 40 rows of data, for 16
hours (5:00AM to 9:00PM). After I load the series data, how can I tell the
chart to size itself to display the first 10 rows, from 12pm to 6pm?

Also, how do I eliminate the dead space between days? For instance I may show a Gannt chart for 7 days, but there is no data from 12AM-6AM for any of the days. How can I get rid of the blank areas in the chart from 12AM-6AM?

Posted: Thu Feb 10, 2005 7:37 pm
by 9524644
OK, I figured out the range...

Code: Select all

WITH THISFORM.TeeGraph.Axis
  .Left.Automatic = .F.
  .Left.Maximum = MIN(RECCOUNT("Graph_Vert"),12)
  .Bottom.Automatic = .F.
  .Bottom.Maximum = tEndDate + 3600
  .Bottom.Minimum = tStartDate
ENDWITH
However, I still have not figured out how to get rid of the "overnight dead space". Still looking for some help on that.[/code]

Posted: Fri Feb 11, 2005 8:44 am
by narcis
Hi KTB,

Having a look at the "Axis Labels No Weekends" example in the TeeChart features demo will help you solving this. You can find this demo in the program manager TeeChart entry.