Java Gantt Control: Proper Positioning with Auxiliary Lines

Posted by Bernd-Rainer Lauber on Nov 5, 2014 9:33:02 AM

The interactive shifting of bars is one of the core functions of a Gantt chart application. Drag & drop allows quickly replanning tasks and operations in case conflicts like capacity overload, missed delivery date commitments etc. become visible in the Gantt chart. In practice, the planner simply grabs the bar and shifts it to another date. But what if precise dates and times have to be met when moving the task/ activity in the Gantt chart? In this case, auxiliary lines help to exactly position the operation. In this blog post we describe how you configure, define and visualize auxiliary lines with our Java Gantt control VARCHART JGantt.

Sometimes Gantt charts visualize many tasks one below each other. In these cases it might become difficult for the planner when to drag and drop one task exactly at the same start or end date of another task that is far above or below (and maybe even not seen at the initial screen). An auxiliary line is a great help to position interactively the bar at the required date. 

In VARCHART JGantt you can use the property NodePhantomPositionLine for this. When clicking on a bar a phantom appears simulating the new position when horizontally moving the bar. The phantom will be equipped with vertical lines at the start and/or end position of the bar and going up to the timescale. Line plus phantom makes it extremely easy for a planner when he has to shift a task or activity that should coincide with a specific start or end date of another task. It also assists the planner when he has to select an exact date from the timescale when rescheduling.

Three quick steps for exact positioning:

1.  Click

Auxiliary lines in VARCHART JGantt

2. Move

 Auxiliary lines in VARCHART JGantt

3. Drop

Auxiliary lines in VARCHART JGantt



You can define the property NodePhantomPositionLine in the Property Editor of VARCHART JGantt (you can learn more about the Property Editor in the first tip discussed in this blog post about 3 key features of a Java Gantt chart control).

VARCHART JGantt Property Position Line for Node Phantoms

Here you can specify the appearance of lines and phantoms as well as whether a vertical positioning line should appear at the beginning and/or at the end of a node. 

These auxiliary lines are a great hidden asset of VARCHART JGantt. Another hidden asset of the same quality is the capability to define time-scale section, which we call the magnifying class trick, and which we described in another blog post.

Want to test auxiliary lines as well as the magnifying class trick? Download a trial version of our Java Gantt Control VARCHART JGantt.


New Call-to-action


Topics: Java Gantt Control, JGantt development tricks, Gantt Best Practice, Gantt Chart Controls