greedyGraphLayout

function greedyGraphLayout<A extends Annotation>(ann: A [], tolerance: number, vertSortFunction: (verts: string [], graph: AnnotationGraph <A>): void): MapVerticalLayout

This function takes a list of Annotation objects and uses a deterministic greedy graph coloring algorithm to assign each of them a y coordinate in terms of horizontal bins that will prevent any horizontal overlap when they are rendered in a Chart.

Type parameters

  • A: Annotation

Parameters

  • ann: A []

  • tolerance: number

  • vertSortFunction: (verts: string [], graph: AnnotationGraph <A>): void

Returns: MapVerticalLayout