Grid Layer
The grid layer is responsible for drawing the vertical and horizontal grid lines. The y-coordinates of the horizontal grid lines are calculated based on the location of the rows and their individual heights. The x-coordinates of the vertical grid lines can be retrieved from the dateline model:
The grid layer can display the grid in different modes: no grid, minor grid, major grid, combined grid. In most cases the minor and the major grid lines can be shown at the same time because the major grid lines are usually on top of a minor grid line. But there are situations where this is not the case, for example when the timeline shows the major granularity 'months' and the minor granularity 'weeks'. The appearance of the grid lines would be visually unpleasant with major grid lines between two minor grid lines, sometimes closer to the left or the right line. To avoid this the grid layer uses a special policy called IGridLinePolicy. The layer queries this policy for the visibility of the major and minor grid lines. The currently used dateline model gets passed to the policy's methods as the results are dependent on it.
Relevant API
GridAction
GridLineMode
List<GridLine> IDatelineModel.getGrid(int x1, int x2, boolean major);
void AbstractGanttChart.setGridLineMode(GridLIneMode);
IGridLinePolicy
