Skip to content

Adding Content

The g-content directive in Graphane is a feature that enables to incorporate content from data into an elements. This directive provides the flexibility to dynamically generate and populate the SVG based on the provided data. When the SVG is rendered, the directive will be processed, and the specified content will be inserted in the appropriate locations.

The g-content directive supports both text and SVG source code as the content source. This means that you can populate the target elements with either plain text or dynamically generate SVG code, giving you a wide range of possibilities for data-driven visualizations or custom designs.

If you want to load the content from an external resource, you can use the $$.fromURL() helper as an expression of the g-content directive indicating the URL from which the content to be inserted inside the element will be downloaded.

Released under the MIT License.