---
title: "Installation"
framework: javascript
version: "14.1.0"
---

# Installation

AG Charts is available for download from NPM, CDN or as a direct download, however, we strongly recommend using either NPM or CDN. When using NPM, you need to import the package and register the modules you want to use.

## NPM Installation

Install the `ag-charts-community` package:

#### NPM

```bash
npm install ag-charts-community
```

#### Yarn

```bash
yarn add ag-charts-community
```

To use AG Charts Enterprise features, install the `ag-charts-enterprise` package:

#### NPM

```bash
npm install ag-charts-enterprise
```

#### Yarn

```bash
yarn add ag-charts-enterprise
```

> **Note**
>
> You can test AG Charts Enterprise locally without a licence. To test in production, access support and remove the watermark & console warnings, [request a trial licence](https://www.ag-grid.com/charts/javascript/community-vs-enterprise/#request-a-30-day-enterprise-bundle-trial-licence).

### Registering Modules

Register the `AllCommunityModule` to access all Community features:

```js
import { AllCommunityModule, ModuleRegistry } from 'ag-charts-community';

// Register all Community features
ModuleRegistry.registerModules([AllCommunityModule]);
```

Register the `AllEnterpriseModule` to access all Community and Enterprise features:

```js
import { AllEnterpriseModule, ModuleRegistry } from 'ag-charts-enterprise';

// Register all Community and Enterprise features
ModuleRegistry.registerModules([AllEnterpriseModule]);
```

> **Note**
>
> To minimise bundle size, only register the modules you want to use. See the [Selecting Modules](https://www.ag-grid.com/charts/javascript/module-registry/#selecting-modules) docs for more information.

### Importing

To use AG Charts Community features, import them from the `ag-charts-community` package, e.g:

```js
import { AgCharts } from 'ag-charts-community';
```

To use AG Charts Enterprise features, import the `ag-charts-enterprise` package:

```js
import 'ag-charts-enterprise';
```

See the [Installing Enterprise Licence Key](https://www.ag-grid.com/charts/javascript/license-install/) docs for more information on how to install your Enterprise or [Trial](https://www.ag-grid.com/charts/javascript/community-vs-enterprise/#request-a-30-day-enterprise-bundle-trial-licence) licence key.

### Accessing AG Charts

To use AG Charts in your JavaScript application, use the `create` API to create a chart with your chart options:

```js
// Chart Options
const options = {
    /*...*/
};

// Create Chart
const chart = AgCharts.create(options);
```

## CDN Installation

To install AG Charts Community, include the following script tags in your HTML file:

```html
<script src="https://cdn.jsdelivr.net/npm/ag-charts-community@14.1.0/dist/umd/ag-charts-community.min.js"></script>
```

To install AG Charts Enterprise, include the following script tags in your HTML file:

```html
<script src="https://cdn.jsdelivr.net/npm/ag-charts-enterprise@14.1.0/dist/umd/ag-charts-enterprise.min.js"></script>
```

Once installed, you can then access AG Charts via the `agCharts.AgCharts` global variable. See the [Quick Start](https://www.ag-grid.com/charts/javascript/quick-start/) for more information.

## Download

If your project does not use a package manager and you don't want to refer to AG Charts from CDN, you can download AG Charts' source files and keep them in your project structure.

> **Warning**
>
> Downloading AG Charts makes upgrading more complex and prone to errors. We recommend using AG Charts from an NPM/Yarn package or from CDN.

#### Community

You can download AG Charts Community from the [GitHub Repository]([object Object]).

#### Enterprise

You can download AG Charts Enterprise from the [GitHub Repository]([object Object]).

After downloading the bundles, you can refer to the files in the same way as you would from CDN. See the [Quick Start](https://www.ag-grid.com/charts/javascript/quick-start/) for more information.
