Node.js and is installed locally via npm. Details about the custom chart CLI can also be found in https://www.npmjs.com/package/composer-chart-cli.
Before installing Self-Service Analytics’s custom chart CLI, verify that
Node.js version 10 or later and npm version 5.6 or later are installed on your machine.npm scripts. The custom chart CLI also supports the configuration of multimetric and group variables.
For a full list of common commands, see Commands for the Custom Chart CLI. A step-by-step tutorial for creating a custom chart can be found in A Custom Chart Tutorial.
This section covers the following topics:
- Supported Custom Chart CLI Versions
- Install and Configure the Custom Chart CLI
- Create a Custom Chart Using the CLI
- Install Dependencies and Build the Custom Chart Using the CLI
- Edit the Custom Chart Using the CLI
- Push the Custom Chart to the Server Using the CLI
- Remove a Custom Chart from the Server Using the CLI
- List All Custom Charts on the Server Using the CLI
- Import a Custom Chart Using the CLI
- Custom Chart Support for Cross-Visual Links and Filters
Install and Configure the Custom Chart CLI
Before installing Self-Service Analytics’s custom chart CLI, verify that
Node.js version 10 or later and npm version 5.6 or later are installed on your machine.-
Install the custom chart CLI by running the following:
-
After installation, you can configure the default environment that is used by the custom chart CLI. This makes creating and pushing custom charts easier, as you do not have to provide the server URL and credentials with every command. Run the following to start the configuration process:
- Follow the prompts to store your default server configuration in an encrypted file. After the server configuration has been saved, the CLI checks for the presence of this file when you omit the server URL and credentials when running commands.
- After installing, you can create new visuals or make updates to current custom charts.
Commands for the Custom Chart CLI
Access a list of custom chart CLI commands at any time by runningcmp-chart. For help on any command, simply enter its name or enter cmp-chart help. For example, entering cmp-chart init without any parameters will show the help for the cmp-chart init command.
Self-Service Analytics Custom Chart CLI version 1 only supports the use of
vnd.composer.v3+json as the Content-Type for API routes.Common Commands
Syntax
- server (ex. http://myserver.com:8080/discovery)
- user name
- password
- -h, —help output usage information
- Components
- Controls
- Libraries
- Name
- Visibility
- -a, —app [URL] Specify the Self-Service Analytics application server URL (e.g. https://myserver/discovery)
- -u, —user [user:password] Specify the user name and password to use for server authentication.
- -h, —help output usage information
- -t, —type <type> Specify the visual type. Valid values are single-group, multi-group, or raw. The default is single-group.
- -h, —help output usage information
- -a, —app [URL] Specify the Self-Service Analytics application server URL (e.g. https://myserver/discovery)
- -u, —user [user:password] Specify the user name and password to use for server authentication.
- -h, —help output usage information
- -a, —app [URL] Specify the Self-Service Analytics application server URL (e.g. https://myserver/discovery)
- -d, —dir [path/to/source/files] Directory used to look for the visual to push.
- -u, —user [user:password] Specify the user name and password to use for server authentication.
- -h, —help output usage information
- -a, —app [URL] Specify the Self-Service Analytics application server URL (e.g. https://myserver/discovery)
- -u, —user [user:password] Specify the user name and password to use for server authentication.
- -h, —help output usage information
- -a, —app [URL] Specify the Self-Service Analytics application server URL (e.g. https://myserver/discovery)
- -d, —dir [path/to/source/files] Directory used to look for the visual to watch.
- -u, —user [user:password] Specify the user name and password to use for server authentication.
- -h, —help output usage information
Create a Custom Chart Using the CLI
A complete example of creating a custom chart using the custom chart CLI can be found in A Custom Chart Tutorial.Self-Service Analytics Custom Chart CLI version 1 only supports the use of
vnd.composer.v3+json as the Content-Type for API routes.- Open the Self-Service Analytics CLI.
-
Run the following command to create the visual.
Optionally, you can provide a type parameter. Valid values are
single-group,multi-group,orraw. The default issingle-group. For example:
cmp-chart init command creates a directory in the specified path containing the files you need to get started. Here is a preview of the directory tree:

Edit the Custom Chart Using the CLI
Edit a custom chart using the custom chart CLI Make sure you are in the visual’s folder and run the following edit command:Self-Service Analytics Custom Chart CLI version 1 only supports the use of
vnd.composer.v3+json as the Content-Type for API routes.Install Dependencies and Build the Custom Chart Using the CLI
To install dependencies and build the custom chart using the custom chart CLI:-
Run the following command at the root level of the newly created custom chart to install dependencies:
-
Run the following command at the root level of the custom chart to build the chart:
Custom chart CLI version 5 only supports the use of
vnd.composer.v2+json as the Content-Type for API routes. CLI version 4 only supports the use of vnd.zoomdata.v2+json.Push the Custom Chart to the Server Using the CLI
Push the custom chart to the server using the Custom Chart CLI Run the following command:Self-Service Analytics Custom Chart CLI version 1 only supports the use of
vnd.composer.v3+json as the Content-Type for API routes.Import a Custom Chart Using the CLI
Import a custom chart using the custom chart CLI Run thecmp-chart import command, specifying the path to the library. You can import visual zip files that were downloaded from the Manage Custom Charts page or a custom chart created with an older version of the CLI.
<path-to-visual> is the relative path to the zip file containing the visual you want to import.
The following options are available:
-a, -app [URL]Specify the Self-Service Analytics application server URL (e.g. https://myserver/discovery)-u, -user [user:password]Specify the user name and password to use for server authentication.-h, -helpOutput usage information
Self-Service Analytics Custom Chart CLI version 1 only supports the use of
vnd.composer.v3+json as the Content-Type for API routes./dist directory containing the necessary files required to send the visual to the Self-Service Analytics server. This /dist custom chart zip file is not compatible with the cmp-chart import command and cannot be imported using the Manage Custom Charts page in the UI. To import the /dist custom chart zip file, use the cmp-chart push command instead.
List All Custom Charts on the Server Using the CLI
List all custom charts stored on the Self-Service Analytics server using the Custom Chart CLI Run the following command:Self-Service Analytics Custom Chart CLI version 1 only supports the use of
vnd.composer.v3+json as the Content-Type for API routes.Remove a Custom Chart from the Server Using the CLI
Remove a custom chart from the server using the Custom Chart CLI Run the following command:Self-Service Analytics Custom Chart CLI version 1 only supports the use of
vnd.composer.v3+json as the Content-Type for API routes.Migrate Custom Charts
Custom charts in Self-Service Analytics can be created and managed using the Logi Composer Custom Chart CLI tool.- Logi Composer Custom Chart CLI version 1 (
composer-chart-cli) supports Logi Composer 7.10 and later. - CLI version 6 (
zoomdata-chart-cli) supports Composer 7.10 and earlier. - CLI version 5 (
zoomdata-chart-cli) supports Composer 7.9 and earlier.
File Structure
The custom chart file structure for supported versions of custom charts:- Logi Composer Custom Chart CLI v1 (
composer-chart-cli) - CLI v6 (
zoomdata-chart-cli) - CLI v5 (
zoomdata-chart-cli)
Custom Chart CLI File Structure

API Route Differences
Composer Custom Chart CLI version 1 only supports the use of
vnd.composer.v3+json as the Content-Type for API routes.CLI Commands
The command differences between CLI versions are described in the following table:
If you need to migrate custom charts from an unsupported version of Logi Composer, contact Technical Support for assistance.
Supported Custom Chart CLI Versions
Custom charts in Self-Service Analytics can be created and managed using the Custom Chart CLI tool. Logi Composer Custom Chart CLI version 1 (composer-chart-cli) supports Logi Composer 7.10 and later, through this current release.
Logi Composer Custom Chart CLI version 1 only supports the use of
vnd.composer.v3+json as the Content-Type for API routes./dist directory containing the necessary files required to send the visual to the server.