Visits from this page
import { sequentialSunburst, buildHierarchy } from 'vizart-hierarchy';
import 'vizart-hierarchy/dist/vizart-hierarchy.css';
d3.text("./data/visit-sequences.csv", (text)=> {
let csv = d3.csvParseRows(text);
let json = buildHierarchy(csv);
let sunburst = sequentialSunburst('#chart', {
chart: {
margin: {
top: 40,
bottom: 40,
left: 0,
right: 0
},
},
uiConfig: {
sequence: '#sequence',
explanation: '#explanation',
percentage: '#percentage'
}
},);
sunburst.render(json);
sunburst.drawLegend('#legend')
});