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!
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!
5 Answers, 1 is accepted
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;
}
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
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
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.
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
0

Ian
Top achievements
Rank 2
Bronze
Iron
Iron
answered on 21 Oct 2024, 05:04 PM
Excellent solution - thanks