<EntityMap />
Added in
eventcatalog@2.49.0A 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​
- Include the
<EntityMap/>component inside the markdown- e.g
/domains/OrdersDomain/index.mdx
- e.g
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​

Props​
| Name | Type | Default | Description |
|---|---|---|---|
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) | string | 30 | Max height to set the nodegraph in your document. |
includeKey (optional) | boolean | true | Show 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​
Added in
eventcatalog@2.51.1The <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