This commit is contained in:
duanhao 2025-08-08 10:07:08 +08:00
commit 6c143c2a55

View File

@ -6,7 +6,7 @@
<TimeAxis
v-if="timeList.length"
:time-list="timeList"
:is-auto-play="isPlay"
:is-auto-play="false"
:start-time="new Date(timeList[0])"
:end-time="new Date(timeList[timeList.length - 1])"
@click:pointerDown="handlePointerDown"
@ -40,18 +40,18 @@ const defaultConfig = {
show: true,
font: "normal 14px KaiTi",
color: "250,250,250",
textPosition: "Bottom_Center", //Middle_Center
textPosition: "Middle_Center", //Middle_Center
textOffsetY: 10
},
shape: "circle",
size: 30,
size: 60,
borderColor: "200,50,50",
borderWidth: 0,
selected: {
borderWidth: 2,
borderColor: "100,250,100",
showShadow: true, //
shadowBlur: 10, //
shadowBlur: 5, //
shadowColor: "50,250,30" //
}
},
@ -64,7 +64,7 @@ const defaultConfig = {
background: "255,255,255" //,
},
lineType: "straight", // curver
showArrow: false,
showArrow: true,
lineWidth: 2,
colorType: "both",
color: "240,240,240",
@ -131,16 +131,18 @@ const registEvents = () => {
}
const runForceLayout = (layoutConfig, layoutType, isAsync) => {
//
graphVis.excuteWorkerLayout(
graphVis.getGraphData(),
layoutType,
layoutConfig,
isAsync,
function () {
isPlay.value = true
graphVis.zoomFit() //
// isPlay.value = true
graphVis.zoomFit() //
}
)
graphVis.hideIsolatedNodes() //
}
// cluster
const clusterAnalyze = () => {
@ -173,6 +175,7 @@ const clusterAnalyze = () => {
group.smoothPath = false //线
})
graphVis.autoGroupLayout(graphVis.nodes)
// graphVis.selectedEdge(graphVis.links[0])
}
const createGraph = () => {
@ -205,7 +208,6 @@ const updateChart = (newGraphData) => {
}
graphVis.clearAll()
graphVis.addGraph({ ...toRaw(newGraphData) })
graphVis.zoomFit()
//
clusterAnalyze()
runForceLayout({ strength: -500, ajustCluster: true }, "simulation", true)