Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Properties

Gantt Arrow Configuration

For Gantt Chartsgantt.arrow controls the various properties of the arrows connecting tasks.

Examle:

Code Block
languagejava
final Arrow arrow = Arrow.Builder()
	.angle(1) //The angle of the head of the arrow.
	.color("blue") //The color of the arrows.
	.length(4) //The length of the head of the arrow.
	.width(3) //The width of the arrows.
	.radius(0) //The radius for defining the curve of the arrow between two tasks.
	.spaceAfter(3) //The amount of whitespace between the head of an arrow and the task to which it points.
	.build();

Gantt Configuration

Example:

Code Block
languagejava
final Gantt gantt = Gantt.Builder()
	.arrow(arrow)
	.barCornerRadius(0) //The radius for defining the curve of a bar's corners.
	.barHeight(15) //The height of the bars for tasks.
 	.criticalPathEnabled(true) //If true any arrows on the critical path will be styled differently.
    .criticalPathStyle(LineStyle.New("red", 3)) //An object containing the style for any critical path arrows.
	.defaultStartDate(DateValue.Date(LocalDate.now())) //If the start date cannot be computed from the values in the 
															DataTable, the start date will be set to this.
	.innerGridDarkTrack(BarStyle.New("white")) //The fill color of the inner grid track.
	.innerGridHorizLine(LineStyle.New("black", 3)) //Defines the style of the inner horizontal grid lines.
	.innerGridTrack(BarStyle.New("gray")) //The fill color of the inner grid track.
	.labelStyle(TextStyle.New("black", "Arial", 12)) //An object containing the styles for task labels.
	.labelMaxWidth(20) //The maximum amount of space allowed for each task label.
	.percentEnabled(true) //Fills the task bar based on the percentage completed for the task.
	.shadowColor("blue") //Defines the color of the shadows under any task bar which has dependencies.
	.shadowEnabled(true) //If set to true, draws a shadow under each task bar which has dependencies.
	.shadowOffset(4) //Defines the offset, in pixels, of the shadows under any task bar which has dependencies.
	.trackHeight(40) //The height of the tracks.
.build();

this.ganttChart.setGantt(gantt);

...