# GraffitiOrgChart
Class Inherits GraffitiWebUIControl
## About
GraffitiOrgChart is a simple yet powerful class to display interactive data in a hierarchical manner in your user interface. This class supports adding and removing nodes by the user, as well as editing node content at runtime.
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| True | True |
### Web
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| Directions | TopToBottom <br > BottomToTop <br > LeftToRight <br > RightToLeft | Supported chart rendering directions. |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| GotFocus | (None) | (None) | (None) |
| ItemAdded | item as GraffitiOrgChartItem | (None) | Raised when the user adds an item using the + button on an existing item. |
| ItemContentChanged | item as GraffitiOrgChartItem | (None) | Raised when user has edited an item's text. |
| ItemDragged | item as GraffitiOrgChartItem <br> newParent as GraffitiOrgChartItem | (None) | Raised when the user has changed the location of an item by dragging with the mouse. |
| ItemRemoved | item as GraffitiOrgChartItem | (None) | Raised when the user has removed an item using the × button. |
| ItemTitleChanged | item as GraffitiOrgChartItem | (None) | Raised when the user has changed the title of an existing item. |
| LostFocus | (None) | (None) | (None) |
| MouseEnter | (None) | (None) | (None) |
| MouseExit | (None) | (None) | (None) |
| Open | (None) | (None) | (None) |
| SelectionChanged | (None) | (None) | Raised when the user selects an item. |
| Shown | (None) | (None) | (None) |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| AddItem | item as GraffitiOrgChartItem | (None) | Adds the specified item as a child of the root node. |
| FindByTag | tag as Variant <br> parent as GraffitiOrgChartItem = nil | GraffitiOrgChartItem | Finds an item by Tag value. |
| FindByTitle | title as String <br> parent as GraffitiOrgChartItem = nil | GraffitiOrgChartItem | Finds an item by Title value. |
| fromJSON | data as JSONItem | (None) | Loads items from a JSONItem. |
| IndexOf | item as GraffitiOrgChartItem | Integer | Returns the index of the specified item. |
| Item | index as Integer | GraffitiOrgChartItem | Returns the item specified by the index. |
| LastIndex | (None) | Integer | Returns the index of the last child of the root node. |
| RemoveAll | (None) | (None) | Removes all items. |
| RemoveItem | item as GraffitiOrgChartItem | (None) | Removes the item specified by index. |
| RemoveItem | index as Integer | (None) | Removes the item specified by index. |
| ResetView | (None) | (None) | (None) |
| ScrollTo | item as GraffitiOrgChartItem = Nil | (None) | (None) |
| toJSON | (None) | JSONItem | Exports the current items to a JSONItem. |
| ZoomIn | (None) | (None) | Zooms in. |
| ZoomOut | (None) | (None) | Zooms out. |
| ZoomRelative | percentValue as Double | (None) | Zoom the viewer by the specified percentage. Value of 200 will zoom to 2x, value of 50 will zoom to 0.5x. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| DisplayDirection | Directions | (None) | Determines the direction the chart is drawn. |
| RootNodeContent | String | (None) | Text displayed in the root node. |
| RootNodeTitle | String | (None) | Text displayed as the title of the root node. |
| SelectedItem | GraffitiOrgChartItem | (None) | The currently selected item. |