Supported Custom Chart CLI Versions

Zoomdata supports the following two versions of its Custom Chart CLI: 3 and 4.

The file structure of custom charts and some CLI commands changed in version 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 a Custom Chart Using the CLI.

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

In version 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 version 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 version 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 Custom Chart CLI command changes are included in version 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 Custom Chart CLI version 4 globally and migrate your existing custom charts to the new version 4 directory structure. See Migrating Custom Charts. If you prefer to continue supporting version 3 and its commands as well as working with CLI 4, Zoomdata suggests that you install version 4 locally but retain version 3 globally. See Using Previous and Current Versions of the CLI on a Single Machine.