This section describes how to create your own Custom Visualization Component and publish it for use in Studio.
Creating a Custom Visualization Component
You create a component by coding a JavaScript file that uses the Custom Visualization Component JavaScript API to initiate queries and render the returned data to the component. You upload the file as part of the component configuration. Also you write one or more EQL statements to provide the result set for the component.
Using tokens in an EQL query
The EQL queries for a Custom Visualization Component support token replacement in the EQL query. Tokens are simply variables in an EQL query that correspond to user-interface controls in the Visualization Settings panel the component. Controls include attributes (metrics or dimensions), views, data views and sorts. For example, a sort token in an EQL query creates an ASC or DSC sort control in the component configuration for a project user to select. A dimension token creates a drop down menu of attributes for a project user to select.
Editing JavaScript during development
As a troubleshooting convenience, Studio provides an inline JavaScript editor so you can modify a component's JavaScript directly. You do not have to upload the file again using the Add Component wizard. You modify the JavaScript inline as part of debugging the component. This JavaScript editor is available only while a component is unpublished.
Publishing a Custom Visualization Component
After you are satisfied that a Custom Visualization Component behaves as desired, you publish it to make it available on the Discover page of Studio to all Studio users. Unpublished components are available only to administrators.
Unpublishing a Custom Visualization Component
To remove a Custom Visualization Component from the component menu, you unpublish it. Previously created instances of the component are still available on the Discover page, but business users cannot create new instances of the component after it has been unpublished.
Deleting a Custom Visualization Component
Deleting removes the component from the component menu of the Discover page and removes the component from any project where it was used.