import { biPartite } from 'vizart-path';
import 'vizart-path/dist/vizart-path.css';
const options = {
data: {
source: {
name: 'product',
type: 'string',
accessor: 'product'
},
target: {
name: 'customer',
type: 'string',
accessor: 'customer'
},
links: [
{
name: 'volume',
type: 'number',
accessor: 'volume'
},
{
name: 'profit',
type: 'number',
accessor: 'profit'
}
],
},
};
const _data = ...
const _chart = biPartite('#chart', options);
_chart.render(_data);