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
Props | Type | Required | Description |
---|---|---|---|
data | { nodes: Node[], edges: Edge[] } | ✔️ | Data to render |
baseNodeId | string | ✔️ | Central node id in the server-map |
customTheme | ThemeType | Custom style object | |
onClickNode | ClickEventHandler<MergedNode> | Callback to execute when clicking nodes | |
onClickEdge | ClickEventHandler<MergedEdge> | Callback to execute when clicking edges | |
onClickBackground | ClickEventHandler<{}> | Callback to execute when clicking background | |
renderNodeLabel | (node: MergedNode) => string ㅣ undefined | Custom node label | |
renderEdgeLabel | (node: MergedEdge) => string ㅣ undefined | Custom edge label |