-
Notifications
You must be signed in to change notification settings - Fork 0
rose
XING Yun edited this page Mar 27, 2018
·
2 revisions
import { rose } from 'vizart-basic';
import 'vizart-basic/dist/vizart-basic.css';
const options = {
chart: {
margin: { left: 30, right: 30, top: 10, bottom: 30 }
},
data: {
x: { name: 'Director', type: 'string', accessor: 'Director'},
y: [{ name: 'Total', type: 'number', accessor: 'Total', yAxis: 0}],
},
};
const chart = rose('#chart', options);
d3.csv('./data/movies.csv', function(err, res){
chart.render(res);
});
Default options:
const RoseOpt = {
chart: {
type: 'rose',
},
plots: {
opacity: 0.5,
outerRadiusMargin: 10,
axisLabel: null,
axisLabelAlign: true,
axisLabelAlignThreshold: 0.5,
axisLabelOffset: 10,
axisLabelColor: 'black',
dimensionOrder: null,
},
};
Opacity. 0.5 by default
outer radius margin. 10 by default
a function to display axis label
align labels? true by default
threshold of aligning labels
label offset. 10 by default
label color. black by default
function to sort dimensions