Zoomdata Version

Supported Custom Chart CLI Versions

Two custom chart versions are currently supported: CLI 3 and CLI 4.

The file structure of custom charts and some CLI commands changed in CLI 4, although the chart API has not changed. In addition, you can now easily share a custom chart without its source. For information about using the new CLI version, see Creating Custom Charts with CLI.

CLI 4 must be used with Zoomdata 3.2 and later. CLI 3 should be used with Zoomdata 3.1 and earlier.

In CLI 4, a custom chart is bundled before it is pushed to the Zoomdata server. Bundling can be accomplished using a tool such as webpack. This creates a /dist directory containing the necessary files required to send the chart to the Zoomdata server.

In CLI 3, you could zip up the entire custom chart directory to share the chart and its source with someone. You can still do this in CLI 4, but you can also easily share a custom chart without its source by simply zipping the files in the /dist directory within the custom chart directory. Note that this /dist custom chart zip file is not compatible with the zd-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 zd-chart push command instead.

The following CLI command changes are included in CLI 4:

Command Update Made Description
zd-chart add Removed Use the zd-chart import command instead.
zd-chart init Added Use this command to create a new chart in a folder you specify. This command combines the functions of the zd-chart create and zd-chart pull commands.
zd-chart edit Changed Updates the chart locally, but no longer pushes the updated chart to the server.
zd-chart push Changed Pushes the new bundled format of a custom chart to the server.
zd-chart import <zip-file-path> Added Imports a chart in a zip file.
zd-chart watch Changed Watches changes in the src directory and pushes them to the server.
zd-chart create Removed Use the zd-chart init command instead.
zd-chart pull Removed Use the zd-chart init command instead.

Zoomdata recommends that you install CLI version 4 globally and migrate your existing custom charts to the new CLI 4 directory structure. See Migrating Custom Charts. If you prefer to continue supporting CLI 3 and its commands as well as working with CLI 4, Zoomdata suggests that you install the CLI 4 version locally but retain CLI 3 installed globally. See Using Previous and New Versions of the CLI on a Single Machine.

Was this topic helpful?