Zoomdata Version

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

The Zoomdata Custom Chart CLI version 4 was introduced with Zoomdata 3.2. The new and old versions of the Custom Chart 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 Custom Chart CLI version 3 as well as version 4, Zoomdata suggests that you install version 4 locally but retain version 3 globally.

To install the Custom Chart CLI version 4 locally:

  1. Create a new folder. For example:

    $ mkdir zd-chartlocal
    $ cd zd-chartlocal
  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:

    $ 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:

    $ 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?