본문으로 건너뛰기

Examples

Basic

Basic
<ServerMap
data={data}
baseNodeId={'ACL-PORTAL-DEV^SPRING_BOOT'}
/>

Render Node & Edge Label

Render Node & Edge Label
const renderNodeLabel = (node: MergedNode) => {
if (node.nodes?.length > 0) {
return 'This Node is Merged!'
}
}

const renderEdgeLabel = (edge: MergedEdge) => {
if (edge.edges?.length > 0) {
return 'This Edge is Merged!';
}
return 'This Edge is not merged';
}

<ServerMap
data={getServerMapData()}
baseNodeId={'ACL-PORTAL-DEV^SPRING_BOOT'}
renderNodeLabel={renderNodeLabel}
renderEdgeLabel={renderEdgeLabel}
/>