# Global

##

### Methods

#### GraphistryJS(IFrame)

Function that creates a Graphistry Wrapped IFrame

##### Parameters:

Name | Type | Description
--- | --- | ---
`IFrame` | Object | An IFrame that incudes a Graphistry visualization.

Source:
  - index.js, line 869

##### Returns:

Graphistry

##### Example

    <iframe id="viz" src="http://127.0.0.1:10000/graph/graph.html?dataset=Miserables" />
    <script>
    document.addEventListener("DOMContentLoaded", function () {

        GraphistryJS(document.getElementById('viz'))
            .flatMap(function (g) {
                window.g = g;
                document.getElementById('controls').style.opacity=1.0;
                console.log('opening filters');
                return g.openFilters();
            })
            .delay(5000)
            .flatMap(function() {
                console.log('filters opened');
                const columns = [
                    ['edge', 'highways', [66, 101, 280], 'number'],
                    ['point', 'theme parks', ['six flags', 'disney world', 'great america'], 'string']
                ];
                console.log('adding columns', columns);
                return g.addColumns.apply(g, columns);
           })
            .subscribe(function (result) {
                console.log('all columns: ', result);
            });
    });
    </script>

### Type Definitions

#### LabelEvent

A LabelEvent is dispatched by the inner Observables emitted by the labelUpdates() Observable. A LabelEvent is generated for each label update in the visualization.

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`id` | number | the integer ID for the element the label describes
`tag` | String | a string that describes the update kind, either 'added' or 'updated'
`type` | String | the graph component type for the element the label describes, either 'edge' or 'point'
`size` | number | the size in pixels of the element the label describes. This is 0 for edges, and the diameter for points
`pageX` | number | the pageX of the element the label describes
`pageY` | number | the pageY of the element the label describes
`selected` | boolean | a boolean that describes whether element the label describes is selected
`highlight` | boolean | a boolean that describes whether element the label describes is highlighted
`simulating` | boolean | a boolean that indicates the visualization is running clustering
`semanticZoomLevel` | number | the semantic zoom level of the visualization

Source:
  - index.js, line 1034