Skip to main content

<EntityMap />

A component to visually render a domain's entity map.

The <EntityMap/> component is supported in domains, services, and all messages, changelogs, and custom documentation pages.

info

To visualize entities you need to create entities in EventCatalog and assign them to your services or domains.

Usage​

  1. Include the <EntityMap/> component inside the markdown
    • e.g /domains/OrdersDomain/index.mdx

Example

---
id: OrdersDomain
version: 1.0.0
// rest of your domain frontmatter
---

## Entity Map

This is an entity map for the Orders domain. It shows the entities and their relationships with external entities in this domain.

<EntityMap title="Orders Domain Entity Map" />

Output example in EventCatalog​

Example output

Props​

NameTypeDefaultDescription
id (optional)string-The id of the domain or service entity map to render. By default the component will use the id of the current page. If you want to embed this component into custom documentation pages, you can use the id prop to specify the id of the domain or service to render.
version (optional)string-The version of the domain or service to render. By default the component will use the version of the current page. If you want to embed this component into custom documentation pages, you can use the version prop to specify the version of the domain or service to render.
title (optional)string-The title of the entity map to render.
maxHeight (optional)string30Max height to set the nodegraph in your document.
includeKey (optional)booleantrueShow or hide the legend.
entities (optional)array[]Array of entities (ids or names) to filter in the map. Useful if you want to render a subset of the entities in the map. (Added in v2.51.1). Read more about filtering

Filter Entities​

The <EntityMap/> component will render all entities by default for a given domain.

If you want to render a subset of the entities in the map, you can use the entities prop.

Example

---
# event frontmatter
---
<EntityMap id="OrdersDomain" title="Orders Domain Entity Map" entities={["Order", "Customer"]} />

In this example, only the Order and Customer entities will be chosen to be rendered in the map.

If the Order or Customer entity references other entities, they will also be rendered in the map