Grouped Bar

Basic Bar charts are grouped according to data series
Home / Demo / Grouped Bar
StackedBar

Renderer: Canvas

Module: vizart-basic

Data: Employee Attrition

Doc: API

import { stackedBar } 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 = stackedBar('#chart', options);
_chart.render(_data);