Changing the appearance of the constraints in a Gantt chart

Article ID: 2248
Last updated: 29 May, 2018
Article ID: 2248
Last updated: 29 May, 2018
Revision: 3
Views: 697
Posted: 17 Feb, 2010
by Dean J.
Updated: 29 May, 2018
by Gargani A.

Question

How to change the appearance of the constraints in a Gantt chart?

Answer

The easiest and preferred way of controlling the appearance of a constraint is to use its CSS styling capabilities.

The section "Styling Constraints" in the user's manual details all the properties that can be set through CSS.

If the customization you intend to achieve goes beyond what is possible with CSS (for example, controlling the shape of the constraint), you will have to create a subclass of IlvConstraintGraphic and install it through your own constraint graphic factory.

By default, JViews uses an instance of IlvDefaultConstraintGraphicFactory, which creates instances of IlvConstraintGraphic.

You can create your own subclass of IlvConstraintGraphic and subclass IlvDefaultConstraintGraphicFactory, so that it returns (through the createConstraintGraphic method) an instance of the new constraint graphic subclass.

You can then install your new factory class, thanks to IlvGanttSheet.setConstraintGraphicFactory or IlvHierarchyChart.setConstraintGraphicFactory.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2248
Last updated: 29 May, 2018
Revision: 3
Views: 697
Posted: 17 Feb, 2010 by Dean J.
Updated: 29 May, 2018 by Gargani A.
Also listed in


Others in this category