import { multiLine } 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'} ],
},
plots: {
stackLayout: true,
stackMethod: 'zero',
curve: 'natural',
strokeWidth: 2,
opacityArea: 0.7
}
};
const _data = [
{ age: 19, income: 9, dep: 'science' }
]
const _chart = multiLine('#chart', options);
_chart.render(_data);