!!!###!!!title=How to Obtain VChart——VisActor/VChart tutorial documents!!!###!!!!!!###!!!description=There are several ways to obtain VChart:1. Obtain from npm2. Obtain from cdn3. Obtain from GitHub repository!!!###!!!

How to Obtain VChart

There are several ways to obtain VChart:

  • Obtain from npm
  • Obtain from cdn
  • Obtain from GitHub repository

Obtain from npm

# npm
$ npm install @visactor/vchart

# yarn
$ yarn add @visactor/vchart

For how to use it when obtaining, see How to Import VChart in a Project.

Obtain from cdn

Note: When introducing in cdn mode, you need to pay attention to the reference method of VChart: const vchart = new VChart.default(spec, { dom: 'chart' });

You can get VChart from the following free CDNs:

<!-- unpkg -->
<script src="https://unpkg.com/@visactor/vchart/build/index.min.js"></script>

<!-- jsDelivr -->
<script src="https://cdn.jsdelivr.net/npm/@visactor/vchart/build/index.min.js"></script>

Obtain from GitHub

You can directly get the VChart source code from GitHub:

  • You can directly clone the source code from GitHub.
  • You can also go to VChart's release page, select the corresponding version, and click on the Source code in the Assets section at the bottom of the page, download it to your local machine and extract it for use.