Pie

Pie/Donut
Home / Demo / Pie
Pie

Renderer: SVG

Module: vizart-basic

Data: Employee Attrition

Doc: API

import { pie } 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: {
		x: { accessor: 'age', type: 'number', name: 'Age' },
		y: [ { accessor: 'income', type: 'number', name: 'Monthly Income' } ]
	},
};

const fakeData = [
	{ age: 19, income: 9 }
]

const _chart = pie('#chart', options);
_chart.render(fakeData);