Zoom and Adding x-Axis Points

I''m charting an extended gantt chart with multiple points on the x-axis that represent dates. Let''s say for example, the range is 2 days. So, I set the interval at 3, and hours, and I get a good number of x-labels. When I zoom in, however, I want more labels, so I attach to the VisibleRangeChanged event, check if the zoomFactorX has changed, and if so, set a new DateTimeRange on the PrimaryXAxis, using a calculated interval of: interval = 3 * chartControl1.ZoomFactorX; then: chartControl1.PrimaryXAxis.DateTimeRange = new ChartDateTimeRange (start, start.AddDays(2), interval, ChartDateTimeIntervalType.Hours); This works great, until I start getting really zoomed in. When I get really in there, the chart grid lines become VERY close, making the chart almost black. What does work perfectly, using this, is the actual number of Labels on the x-axis. SO, the question is: HOw can I make the number of vertical lines on the graph grid basically equal the number of label points when its zoomed in? See Attached pictures.

zoom Graph Problem.zip

2 Replies

AD Administrator Syncfusion Team March 15, 2006 12:40 PM UTC

Hi Eric Robishaw, Please take a look at the sample attached. Let me know if this fulfills your requirement. Thanks for your interest in Syncfusion product. Regards, F.Rashidha

Ganttchart.zip


ER Eric Robishaw March 21, 2006 03:34 PM UTC

Now to understand how it works. }

Loader.
Up arrow icon