This is a migrated thread and some comments may be shown as answers.

TimeLineContainer Range

4 Answers 111 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Nikola
Top achievements
Rank 1
Nikola asked on 11 Aug 2014, 05:58 AM
hi,

When I populate my GanttView with datas, for example my Task starts on 1.1.2010 and ends on 1.1.2012, even with 

this.radGanttView.GanttViewElement.GraphicalViewElement.TimelineRange = TimeRange.Year;

the scaling of that is horrible. I would like to scale the whole view better. Or even better, I want that the user scales the timeline it self
with for example a TimeLine Scrollbar to zoom in and to zoom out. 

I have attatched a file!

4 Answers, 1 is accepted

Sort by
0
Nikola
Top achievements
Rank 1
answered on 11 Aug 2014, 11:47 AM
Solved this by adding a RadTrackBar

private void radTrackBar_ValueChanged(object sender, EventArgs e)
{
int zoomfaktor = 10;
double value = 51 + zoomfaktor * Math.Pow(this.radTrackBarZoom.Value, 2d);
Console.WriteLine(string.Format("{0} - {1}", this.radTrackBarZoom.Value, value));
TimeSpan time = new TimeSpan(0, (int)value, 0); this.radGanttView.GanttViewElement.GraphicalViewElement.OnePixelTime = time;
this.radGanttView.GanttViewElement.GraphicalViewElement.OnePixelTime = time;
}
0
Dimitar
Telerik team
answered on 13 Aug 2014, 03:05 PM
Hello Nikola,

Thank you for writing.

I am glad that you have found a solution for your case. Nevertheless do not hesitate to contact us if you have other questions.
 
Regards,
Dimitar
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Omar
Top achievements
Rank 1
answered on 09 Feb 2019, 11:43 AM

Thanks for sharing the solution.

Regards,

Omar

0
Omar
Top achievements
Rank 1
answered on 09 Feb 2019, 11:44 AM

Thanks for sharing the solution.

Regards,

Omar

Tags
GanttView
Asked by
Nikola
Top achievements
Rank 1
Answers by
Nikola
Top achievements
Rank 1
Dimitar
Telerik team
Omar
Top achievements
Rank 1
Share this question
or