block by NPashaP a97b84dd96b9dbb7fd8d1b2acbb5f4ca

biPartite -keyPrimary, keySecondary, value

Full Screen

viz.bP().keyPrimary, viz.bP().keySecondary, viz.bP().value

These methods are used to set the accessor functions for the primary and secondary keys and values for the graph. The primary key determines the groups appearing on the left for vertical orientation and top for horizontal orientation. The secondary is the other part. The value column is used to compute the size of bars.

The left example has the default keyPrimary, keySecondary, and value accessors which are d=>d[0], d=>d[1] and d=>d[2] respectively.

The right example is using d=>d[1] (column with X,Y in data) for primary part, d=>d[0] (column with A,B, C in data) for secondary part, and d=>d[3] for value.

For other options and examples, check VizJS

index.html