Please start using our more robust New Forum, we have put this old forum in archive mode. Thanks.


Welcome Guest Search | Active Topics | Log In

2 Pages12>
Tag as favorite
Bring all tasks into view
magnus.sundstrom
#1 Posted : Monday, March 31, 2014 6:57:22 AM

Posts: 91

Some time ago you made a function for us that brings all tasks into view:

Code:

$gantt_container.GanttControl({BaseTimeUnitWidthMinimum: 0.1});
var ganttChart=$GanttChart.data("GanttChart");
$GanttChart.GanttChart({ ResizeToFit: true });
var sdate = ganttControl.Model.Activities.StartTime.clone().addDays(-7);
var edate = ganttControl.Model.Activities.EndTime.clone().addDays(7);
ganttChart.SetStartTime(sdate);
ganttChart.TrySetEndTime(edate);


This works great, but we don't want the ResizeToFit option set. We solved this by just adding $GanttChart.GanttChart({ ResizeToFit: false }); at the end, but then the longer activities don't fit into the view. They are cut off on the right side. Any ideas?
magnus.sundstrom
#2 Posted : Tuesday, April 01, 2014 7:19:00 AM

Posts: 91

We just found a more important issue with this function. After having clicked the Bring all tasks into view, taskbars can no longer be moved by drag and drop. Sometimes you can move them just once, sometimes not at all. This needs to be fixed asap. You can reproduce it in the standalone sample you sent back to us.
Raja - RadiantQ
#3 Posted : Wednesday, April 02, 2014 10:28:48 AM

Posts: 314

Magnus,

For the first one, Obviously this info is not enough to understand. What is the value you have set to StartTime and EndTime of GanttChart? And what is the range showed on the GanttChart?

magnus.sundstrom wrote:
After having clicked the Bring all tasks into view, taskbars can no longer be moved by drag and drop. Sometimes you can move them just once, sometimes not at all.


We have sent the latest source to you that has a fix of this issue.
Thanks & Regards,
Rajagopal.
magnus.sundstrom
#4 Posted : Wednesday, April 02, 2014 10:43:10 AM

Posts: 91

Try reproducing it by having a 3 year span between start- and end date. Then run the function you sent us. All activites fit nicely within the visible part of the Gantt. Now run "$GanttChart.GanttChart({ ResizeToFit: false });". Now you'll notice that the right-most activites are partyly hidden.

The update you sent cleared up the bugs I've reported, thank you for that! You left some console.log messages in there, but that's OK..
Raja - RadiantQ
#5 Posted : Thursday, April 03, 2014 9:46:10 AM

Posts: 314

Magnus,

With code like this:
Code:
$GanttChart.GanttChart({ ResizeToFit: false});
var sdate = ganttControl.Model.Activities.StartTime.clone().addDays(-7);
var edate = ganttControl.Model.Activities.EndTime.clone().addDays(7);
ganttChart.SetStartTime(sdate);
ganttChart.TrySetEndTime(edate);


The start and end time set via SetStartTime and TrySetEndTime will be at the scrollable corners of the view (not the visible corners of the view). Could you confirm that this is what you see? If yes, then that is the expected behavior.

Is it correct that you actually want the start and end times to be within the "visible portion" of the scrollable view?
Thanks & Regards,
Rajagopal.
magnus.sundstrom
#6 Posted : Thursday, April 03, 2014 9:53:14 AM

Posts: 91

OK. Well yes, as the button says "Bring All tasks in view", that's what we expect - The tasks should all be visible (and centered) in the visible area.
Raja - RadiantQ
#7 Posted : Friday, April 04, 2014 10:55:31 AM

Posts: 314

Magnus,

The best option is for you to turn on ResizeToFit like this, then our APIs will bring all the tasks into view (as there won't be any scrollbar and nothing will be scrolled out):

$GanttChart.GanttChart({ ResizeToFit: true});
var sdate = ganttControl.Model.Activities.StartTime.clone().addDays(-7);
var edate = ganttControl.Model.Activities.EndTime.clone().addDays(7);
ganttChart.SetStartTime(sdate);
ganttChart.TrySetEndTime(edate);

...but of course, you will lose the horizontal scrollbar.

Currently we do not have an option to bring all tasks into the visible portion of a horizontally scrollable chart (ResizeToFit:false).
Thanks & Regards,
Rajagopal.
magnus.sundstrom
#8 Posted : Thursday, April 17, 2014 10:27:44 AM

Posts: 91

We use the code you posted above and then we add this below it:

setTimeout(function(){$GanttChart.GanttChart({ ResizeToFit: false });},100);

Now why does it have to jump to the right and cut off all the activities into the next page when you disable ResizeToFit?? Can't you make it so that it just remains in the current view?
Raja - RadiantQ
#9 Posted : Friday, April 18, 2014 9:57:19 AM

Posts: 314

Magnus,

The default behavior of resetting the resize to fit, it takes the default View Width 2000 and scroll the view into the current anchor time.

To prevent resetting the default view width, we prefer you to do something like this.
Code:
$ganttChart.GanttChart("BeginUpdate");//To stop updating the view changes.
$ganttChart.GanttChart('option', 'ResizeToFit', false);
$ganttChart.GanttChart('option', 'ViewWidth', oldViewWidthValue);
$ganttChart.GanttChart("EndUpdate",true);//To refresh the view with update value, true(force the chart row to redraw)

Thanks & Regards,
Rajagopal.
magnus.sundstrom
#10 Posted : Tuesday, April 22, 2014 4:20:39 AM

Posts: 91

Thanks, that gave some insight. But it doesn't fix the problem with the taskbars being cut off. When you made this feature for us (we paid for it), did you check that it works with tasks that span over 5+ years..?
2 Pages12>
Tag as favorite
Forum Jump  
Please Email support@radiantq.com for any issues

ugg boots outlet cheap ugg sale ugg boots clearance ugg boots sale ugg boots cheap ugg boots for women uggs for cheap ugg shops cheap ugg boots cheap uggs Official Ugg Outlet ugg Store Buy Cheap UGGs ugg boots uk ugg boots usa ugg Online uggs on sale ugg outlets cheap ugg boot Discount UGG Boots discount uggs