Skip to main content
100%

biPartite - orient

✓ Published0🌍 Public
NNPashaP
Last edited Aug 7, 2016
Created on Jul 6, 2016

This example demonstrates the `orient` option in the VizJS `bP` (bipartite) layout, comparing a vertical graph (the default) on the left with a horizontal variant on the right, each using the same small dataset of three primary nodes and two secondary nodes. The code embeds both charts in an SVG canvas, using D3.js v4 for DOM manipulation and the VizJS library’s `viz.bP()` API to generate the bipartite node-link diagrams. Node fill colors are assigned by a custom `fill` function mapping each primary key to a distinct hex color, while edges and bars are rendered as SVG shapes with defined opacity and stroke styles.

AI-generated description

viz.bp().orient

This method is used to set the orientation of the graph. The value can be "vertical" or "horizontal".

The graph on the left is using the default orientation which is vertical and the right graph is using the horizontal orientation.

For other options and examples, check VizJS

gpl-3.0 Licensed

Similar vizzes