Skip to main content

Using ServerMap Component

Create your first ServerMap

Create ServerMap
import React from 'react';
import { ServerMap } from '@pinpoint-fe/server-map';

export default function MyServerMapPage() {
return (
<ServerMap
data={data}
baseNodeId={'MY-APP'}
/>
);
}

Props

PropsTypeRequiredDescription
data{ nodes: Node[], edges: Edge[] }✔️Data to render
baseNodeIdstring✔️Central node id in the server-map
customThemeThemeTypeCustom style object
onClickNodeClickEventHandler<MergedNode>Callback to execute when clicking nodes
onClickEdgeClickEventHandler<MergedEdge>Callback to execute when clicking edges
onClickBackgroundClickEventHandler<{}>Callback to execute when clicking background
renderNodeLabel(node: MergedNode) => string ㅣ undefinedCustom node label
renderEdgeLabel(node: MergedEdge) => string ㅣ undefinedCustom edge label