-
Notifications
You must be signed in to change notification settings - Fork 0
stream
XING Yun edited this page Mar 27, 2018
·
2 revisions
import { stream } from 'vizart-basic';
import 'vizart-basic/dist/vizart-basic.css';
const options = {
chart: {
height: 420,
margin: { left: 30, right: 30, top: 10, bottom: 30 }
},
data: {
s: { name: 'Department', type: 'string', accessor: 'dep'},
x: { name: 'Age', type: 'string', accessor: 'age'},
y: [ { name: 'Monthly Income', type: 'number', accessor: 'income'} ],
}
};
const data = [
{ age: 19, income: 9, dep: 'science' }
]
const chart = stream('#chart', options);
chart.render(data);
transit to wiggle layout
transit to silhouette layout
transit to divergent layout
const DefaultOptions = {
chart: {
type: 'stream',
},
plots: {
stackMethod: 'wiggle',
highlightNodeColor: '#F03E1E',
opacityArea: 0.7,
dotRadius: 8,
},
};
Stack method, could be 'wiggle', 'silhouette', or 'divergent'
Node color when is highlighted
area opacity
node radius