节点字体消除

This commit is contained in:
duanhao 2025-08-12 15:54:05 +08:00
parent 03393edb22
commit a3fe33d53c
5 changed files with 13 additions and 13 deletions

View File

@ -86,7 +86,7 @@ const initChart = async () => {
// 绿
const includeAnchorCommunity = Object.entries(anchorCommunityInfo).map(
([communityId, anchorList]) => ({
name: parseInt(communityId), // id
nodeName: parseInt(communityId), // id
anchorCount: anchorList.length, //
anchorList: anchorList, // id
symbol: `image://${new URL(predictionNodeImg, import.meta.url)}`
@ -94,19 +94,19 @@ const initChart = async () => {
)
//
const includedCommunityId = includeAnchorCommunity.map((node) => node.name.toString())
const includedCommunityId = includeAnchorCommunity.map((node) => node.nodeName.toString())
//
const uncontainedAnchorCommunity = Object.keys(community)
.filter((node) => !includedCommunityId.includes(node))
.map((node) => ({ name: parseInt(node), anchorCount: 0, symbol: `image://${new URL(normalGroupNodeImg, import.meta.url)}` }))
.map((node) => ({ nodeName: parseInt(node), anchorCount: 0, symbol: `image://${new URL(normalGroupNodeImg, import.meta.url)}` }))
//ididecharts,
const nodes = includeAnchorCommunity.concat(uncontainedAnchorCommunity).map((node, index) => ({
id: index,
fixed: false,
total: Object.values(community)[node.name].length,
total: Object.values(community)[node.nodeName].length,
category: node.anchorCount > 0 ? 1 : 0, //(1:0)
...node
}))
@ -278,7 +278,7 @@ const initChart = async () => {
shadowBlur: 20,
shadowColor: "#c4a651",
borderColor: "#fcd267",
borderWidth: node.category == 0 ? 1 : 5,
borderWidth: node.category == 0 ? 50 : 100,
borderType: "solid"
}
}

View File

@ -62,7 +62,7 @@ const initChart = () => {
//
const nodes = Object.values(inject("communityNodeList") ?? []).map((item) => ({
id: item.id,
name: item.id,
nodeName: item.id,
isIncludePredictNodes: item.isIncludePredictNodes,
nodesNum: item.nodesNum,
neighbors: item.neighbors,

View File

@ -129,7 +129,7 @@ const initChart = async () => {
//
nodes = props.interactionStore.communityDetailNodeList.map((item) => ({
id: item.userId,
name: item.userName,
nodeName: item.userName,
//
avatarData: item.avatarData,
//
@ -256,7 +256,7 @@ const initChart = async () => {
">
<div style="color:#fff;letter-spacing: 0.14px;">
<div >用户ID${params.data.id}</div>
<div >用户名${params.data.name}</div>
<div >用户名${params.data.nodeName}</div>
</div>
</div>`
}

View File

@ -45,12 +45,12 @@ const initChart = async () => {
//
const nodes = Object.values(communityNodeList).map((item) => ({
id: (item.id),
name: (item.id),
nodeName: (item.id),
symbol: imageSelect(item),
symbolSize: 30,
isIncludePredictNodes: item.isIncludePredictNodes,
nodesNum: item.nodesNum,
neighbors: item.neighbors.map((nei) => ({ ...nei, name: parseInt(nei.id) })),
neighbors: item.neighbors.map((nei) => ({ ...nei, nodeName: parseInt(nei.id) })),
category: item.isIncludePredictNodes ? 1 : 0,
selfIncludeImplicitRelationship:
item.neighbors.map((nei) => nei.id).includes(item.id) && //id
@ -62,7 +62,7 @@ const initChart = async () => {
const edgeSet = new Set() //
nodes.forEach((communityNode) => {
communityNode.neighbors.forEach((communityNei) => {
const key = [communityNode.name, communityNei.name].sort().join("-")
const key = [communityNode.nodeName, communityNei.nodeName].sort().join("-")
if (edgeSet.has(key)) return
links.push({
source: communityNode.id,

View File

@ -350,7 +350,7 @@ const initChart = async () => {
socialGroupsStore.communityAllNodeList.forEach((item) => {
nodes.push({
id: item.userId,
name: item.userName,
nodeName: item.userName,
//
avatarData: item.avatarData,
//
@ -500,7 +500,7 @@ const initChart = async () => {
">
<div style="color:#fff;letter-spacing: 0.14px;">
<div >用户ID${params.data.id}</div>
<div >用户名${params.data.name}</div>
<div >用户名${params.data.nodeName}</div>
</div>
</div>`
}