Zoomdata Version

Using Previous and New Versions of the CLI on a Single Machine

The Zoomdata chart CLI version 4 was introduced with Zoomdata 3.2. The new and old versions of the CLI use different CLI custom chart commands. Zoomdata recommends that you install version 4 globally and migrate your existing custom charts to the new format as described in Migrating Custom Charts.

If you prefer to continue supporting CLI version 3.0 as well as CLI version 4, Zoomdata suggests that you install the new CLI version locally but retain the old CLI version installed globally.

To install zoomdata-chart CLI locally:

  1. Create a new folder. For example:

    $ mkdir zd-chart-local
    $ cd zd-chart-local
  2. Run npm init and accept all default settings.

  3. Install zoomdata-char-cli locally:

    $ npm install zoomdata-chart-cli
  4. Add the following line to scripts in the package.json file:

    "scripts": { ...
    "chart": "zd-chart"
  5. Create a new chart and push it to the server. Steps are given below for both npm and yarn.


    $ npm run chart config (optional)
    $ npm run chart init <path/to/chart>
    $ cd <path/to/chart>
    $ npm install
    $ npm build
    $ cd ..
    $ npm run chart push -- -d <path/to/chart>/dist


    $ yarn chart config (optional)
    $ yarn chart init <path/to/chart>
    $ cd <path/to/chart>
    $ yarn install
    $ yarn build
    $ cd ..
    $ yarn chart push -d <path/to/chart>/dist

For more information, visit Zoomdata's developer zone.

Was this topic helpful?