Function Reference for Standalone Client

You can drive the UI in a standalone instance of zegami by accessing the global Zegami object and call any of the following methods.

pushdata(data) #

Replace the current data with the data passed in. The data format should conform to what’s provided in dataLoader and shape should conform to loadOptions in the config file.

Arguments

  • data:
    • a plain js array of objects
    • tsv format of data
    • csv format of data

Example:

.pushdata([{'country': ['Iceland', 'Denmark'], 'city': ['London']}])

getCurrentItems() #

Returns all data as a json object.

Example:

.getCurrentItems()

getRowMetadataById(id) #

Returns the metadata of the provided row.
Arguments:

  • id: (string) row id

Example:

.getRowMetadataById('1')

setListFilters([{column, values}, {column, values}]) #

Add a filter on the specified column to match only the provided values.
Arguments:

An array of

  • column: (string) the name of the desired column to filter on
  • values: (array) an array of values which should be included in the filter

Example:

.setListFilter([column: 'country', values: ['United Kingdom', 'Egypt']])

resetFilter() #

Removes all existing filters to show all data.

Example:

.resetFilter()

setView(view, config) #

Zooms out of any currently selected items to show the full view. If a configuration is provided, it will be passed to the view.
Arguments:

  • view: (string) the name of the desired view to switch to
  • config: (object) the view settings

Example:

.setView('graph', { horizontalColumn: 'COLUMNNAME', verticalColumn: 'COLUMNNAME', horizontalSort: 'COLUMNNAME', verticalSort: 'COLUMNNAME', horizontalScale: 4, emptyBins: true, })

.setView('grid', { sortBy: 'COLUMNNAME' })

.setView('scatter', { horizontalColumn: 'COLUMNNAME', verticalColumn: 'COLUMNNAME', scaleColumn: 'COLUMNNAME', scale: 1, emptyBins: true, })

resetview() #

Zooms out of any currently selected items to show the full view.

Example:

.resetView()

Powered by BetterDocs