generate_tree_chart
Generate a tree chart to visualize hierarchical data structures like organizational charts, family trees, or file directories from a nested JSON object. Configure layout, orientation, theme, and output as PNG, SVG, or ECharts option.
Instructions
Generate a tree chart to display hierarchical data structure, such as, organizational chart, family tree, or file directory structure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Tree data structure, such as, { name: 'Root', children: [{ name: 'Child 1' }, { name: 'Child 2' }] }. | |
| height | No | Set the height of the chart, default is 600px. | |
| layout | No | Tree layout type. Default is 'orthogonal'. | orthogonal |
| orient | No | Tree orientation. LR=left-to-right, RL=right-to-left, TB=top-to-bottom, BT=bottom-to-top. Default is 'LR'. | LR |
| theme | No | Set the theme for the chart, optional, default is 'default'. | default |
| title | No | Set the title of the chart. | |
| width | No | Set the width of the chart, default is 800px. | |
| outputType | No | The output type of the diagram. Can be 'png', 'svg' or 'option'. Default is 'png', 'png' will return the rendered PNG image, 'svg' will return the rendered SVG string, and 'option' will return the valid ECharts option. | png |