Interface Voronoi

Index

Call signatures

Properties

Methods

Call signatures

(data: Array<T>): Polygon[]

Compute the Voronoi diagram for the specified data.

Parameters

  • data: Array<T>

Returns

Polygon[]

Properties

public clipExtent: { (): number[][]; (extent: number[][]): D3.Geom.Voronoi<T>; }

(): Array<number[]>

Get the clip extent.

Returns

Array<number[]>

(): Voronoi

Set the clip extent.

Returns

Voronoi

public size: { (): number[]; (size: number[]): D3.Geom.Voronoi<T>; }

(): Array<number>

Get the size.

Returns

Array<number>

(): Voronoi

Set the size, equivalent to a clip extent starting from (0,0).

Returns

Voronoi

public x: { (): (data: T, index?: number) => number; (accessor: (data: T, index: number) => number): D3.Geom.Voronoi<T>; (constant: number): D3.Geom.Voronoi<T>; }

(): (data: T, index?: number) => number

Get the x-coordinate accessor.

Returns

(data: T, index?: number) => number

(): Voronoi

Set the x-coordinate accessor.

Returns

Voronoi

(): Voronoi

Set the x-coordinate to a constant.

Returns

Voronoi

public y: { (): (data: T, index?: number) => number; (accessor: (data: T, index: number) => number): D3.Geom.Voronoi<T>; (constant: number): D3.Geom.Voronoi<T>; }

(): (data: T, index?: number) => number

Get the y-coordinate accessor.

Returns

(data: T, index?: number) => number

(): Voronoi

Set the y-coordinate accessor.

Returns

Voronoi

(): Voronoi

Set the y-coordinate to a constant.

Returns

Voronoi

Methods

public links(data: Array<T>): GraphLink[]

Compute the graph links for the Voronoi diagram for the specified data.

Parameters

  • data: Array<T>

Returns

GraphLink[]

public triangles(data: Array<T>): Array<number[]>

Compute the triangles for the Voronoi diagram for the specified data.

Parameters

  • data: Array<T>

Returns

Array<number[]>