-
Notifications
You must be signed in to change notification settings - Fork 0
bi partite
XING Yun edited this page Mar 28, 2018
·
2 revisions
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);
Default options:
{
chart: {
type: 'biPartite',
},
animation:{
duration: {
partite: 500,
}
},
data: {
source: {
name: null,
type: FieldType.STRING,
accessor: null,
},
target: {
name: null,
type: FieldType.STRING,
accessor: null
},
links: [
{
name: null,
type: FieldType.NUMBER,
accessor: null
},
{
name: null,
type: FieldType.NUMBER,
accessor: null
}
],
},
color: DefaultCategoricalColor,
plots: {
buffMargin: 1,
minHeight: 14,
gap: 110,
}
}
margin. 1 by default
minimum height of rects. 14 by default
determines gap between rects. 110 by default