> **Warning** > > ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. > > ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/interfaces/mermaidAPI.RenderResult.md](../../../../packages/mermaid/src/docs/config/setup/interfaces/mermaidAPI.RenderResult.md). # Interface: RenderResult [mermaidAPI](../modules/mermaidAPI.md).RenderResult Function that renders an svg with a graph from a chart definition. Usage example below. ```javascript mermaidAPI.initialize({ startOnLoad: true, }); $(function () { const graphDefinition = 'graph TB\na-->b'; const cb = function (svgGraph) { console.log(svgGraph); }; mermaidAPI.render('id1', graphDefinition, cb); }); ``` **`Param`** The id for the SVG element (the element to be rendered) **`Param`** The text for the graph definition **`Param`** Callback which is called after rendering is finished with the svg code as in param. **`Param`** HTML element where the svg will be inserted. (Is usually element with the .mermaid class) If no svgContainingElement is provided then the SVG element will be appended to the body. Selector to element in which a div with the graph temporarily will be inserted. If one is provided a hidden div will be inserted in the body of the page instead. The element will be removed when rendering is completed. ## Properties ### bindFunctions • `Optional` **bindFunctions**: (`element`: `Element`) => `void` #### Type declaration ▸ (`element`): `void` ##### Parameters | Name | Type | | :-------- | :-------- | | `element` | `Element` | ##### Returns `void` #### Defined in [mermaidAPI.ts:384](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L384) --- ### svg • **svg**: `string` #### Defined in [mermaidAPI.ts:383](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L383)