Public
Edited
Feb 16, 2023
1 fork
Insert cell
Insert cell
Insert cell
dependencyWheel = {
const figure = html`<div style="height: ${
Math.min(width, 1000, 1000) + "px"
}; width:${Math.min(width, 1000, 1000) + "px"};">`;
Highcharts.chart(figure, {
credits: false, // removes watermark,
tooltip: {
distance: 100
},

selectionMarkerFill: "#ff0000",
title: {
text: "Mapa de Interações",
style: { fontSize: 15, margin: 5 }
},
accessibility: {
point: {
valueDescriptionFormat:
"{index}. De {point.from} para {point.to}: {point.weight} interações."
}
},

series: [
{
type: "dependencywheel",
name: 'Relações afetando o "interagível"',
allowPointSelect: true,
states: {
select: {
lineWidth: 5,
borderColor: "#ff0000",
color: "#ff0000",
lineWidthPlus: 5,
marker: {
enable: true,
enabledThreshold: 10,
lineWidth: 20,
radius: 10,
lineColor: "#ff0000"
}
}
},
dataLabels: {
color: "#333",
verticalAlign: "top",
align: "center",
allowOverlap: true,
textPath: {
enabled: false,
attributes: {
translateY: 10,
verticalAlign: "bottom"
}
},
style: { fontSize: 8 },
distance: 50
},
size: "95%",
keys: ["from", "to", "weight"],
data: interatyData
}
]
});
return figure;
}
Insert cell
Insert cell
jsonUrl = 'http://vps44139.publiccloud.com.br/api/v1/export'
Insert cell
world = (await fetch("https://unpkg.com/world-atlas@1/world/110m.json")).json()
try {
interatyData = (await fetch("http://vps44139.publiccloud.com.br/api/v1/export")).json()
}catch (e){
console.warn("fetching",e)
}
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