Code-to-graph allows you to create simple boards using code syntax. This feature is available on Pro, Team, Education, Cacoo for Business MAX, and Free plans.
In this overview, we’ll go over:
- Creating a board
- Code-to-graph syntax
- Customizing a board
- Managing version history
- Editing a board
Creating a board
To create a board using code-to-graph:
- Select “Code-to-graph” from the tool menu.
- Enter your code syntax in the editor.
- Select “Generate” or, if you changed the code, “Enter.”
In the “Help” menu at the bottom of the editor, you’ll find syntax available for constructing code and example boards. Selecting an example board automatically adds it to your sheet and populates the code-to-graph editor.
Code-to-graph syntax
| Function | Example | Result |
| One-to-one connection | a -> b | Creates a connection from shape a to shape b. |
| One-to-many connection | a -> b,c,d | Connects shape a to shapes b, c, and d. |
| Statement terminator | ; or newline character | Ends a statement |
| Text in shapes | [Hello World] or "Hello World" | Creates a rectangle containing the text |
Customizing a board
To customize a board:
- Select the “Properties” icon at the bottom of the editor.
- Adjust any of the following:
- Node layout: Long straight lines (default), balanced, or vertical aligned
- Line type: Corner (default), straight, or elbows
- Node size
- Vertical spacing: Distance between nodes (default: 50 px)
- Select “Save” to apply changes or “Restore defaults” to restore default properties.
- Select “Generate” to update the editor values.
Managing version history
The last 15 versions of the code history are available via the icon at the bottom of the editor.
You can restore any of the versions by selecting the date from the list, which will populate the editor. Select “Generate” to update the board.
Editing a board
You can edit a board using the code editor or by making changes directly in the board.
In the editor, make any changes and select “Generate.”
Changes that can be made directly in the board include shape style, text and text style, and node position. Any other types of changes may not sync with the editor.
To clear the code, use the icon at the bottom of the editor. To delete the board, select and delete objects directly in the sheet.