Public
Edited
Jan 16, 2024
Insert cell
Insert cell
Insert cell
Insert cell
visualise = async container => {
const visualiser = await new AntVG2Plot.Visualiser(container, {
type: "chord",
options
}).build();
container.replaceChildren(visualiser.element);
return visualiser;
}
Insert cell
Insert cell
Insert cell
Insert cell
options = ({
data: data,
sourceField: 'source',
targetField: 'target',
weightField: 'value'
//tooltip: {
// fields: ['name', 'source', 'target', 'value', 'isNode'],
// showContent: true,
// formatter: datum => {
// const { isNode, name, source, target, value } = datum;
// if (isNode) {
// return {
// name: `${name}(源权重)`,
// value: summarise()
// .filter(d => d.source === name)
// .reduce((a, b) => a + b.value, 0)
// };
// }
// return {
// name: `${source} -> ${target}`,
// value
// };
// }
//}
})
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more