-
Notifications
You must be signed in to change notification settings - Fork 0
row
XING Yun edited this page Mar 27, 2018
·
3 revisions
import { row } 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 = row('#chart', options);
chart.render(fakeData);
Default options:
const DefaultOpt = {
chart: { type: 'row' },
plots: {
barLabel: {
enabled: false,
color: 'black',
},
metricLabel: {
enabled: false,
color: 'black',
offset: 10,
},
enableMiniBar: true,
miniBarWidth: 50,
},
};
Display mini bar?
Mini bar width, will take effect only when enableMiniBar is true
enable the dimension label within bars or not.
color of bar label
display metric label on top of bars?
color of metric label
Metric label offset against bar top