# Global

##

### Methods

#### GraphistryJS(IFrame) → {Graphistry}

Function that creates a Graphistry Wrapped IFrame

##### Parameters:

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

Source:
  - index.js, line 829

##### Returns:

Type
  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>