due to project requirements, the name field of the echarts relational node needs to be displayed directly, not when the mouse is moved into the node. As shown in the figure
is there a configuration that supports the direct display of node name attributes?
the current configuration of echarts is as follows:
option = {
legendHoverLink: false,
tooltip: {
show: true,
formatter: "{b0}"
},
legend: {
data: [
{
name: "",
icon: "image://../image/file.png"
}, {
name: "",
icon: "image://../image/chunk.png"
}, {
name: "",
icon: "image://../image/node.png"
}
]
},
series: [
{
type: "graph",
layout: "force",
animation: false,
edgeSymbol: [
"none", "arrow"
],
label: {
show: false,
position: "bottom",
color: "-sharp666"
},
symbolSize: 60,
draggable: true,
data: webkitDep
.nodes
.map(function (node, idx) {
node.id = idx;
return node;
}),
categories: webkitDep.categories,
force: {
initLayout: "circular",
repulsion: 2000,
edgeLength: 300
},
edges: webkitDep.links
}
]
};