# ng2-google-charts

> Google Charts module for Angular 2 and beyond

Latest version **7.0.0** (published 2021-12-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install ng2-google-charts
pnpm add ng2-google-charts
yarn add ng2-google-charts
bun add ng2-google-charts
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 7.0.0 |
| Published | 2021-12-11 |
| First published | 2016-11-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 372.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 118 |
| Author | Giacomo Mazzamuto |
| Maintainers | gmazzamuto |
| Keywords | angular, angular2, ng, ng2, Google, Charts |

## Links

- npm: https://www.npmjs.com/package/ng2-google-charts
- Repository: https://github.com/gmazzamuto/ng2-google-charts
- Homepage: https://www.devrandom.it/software/ng2-google-charts/
- Issues: https://github.com/gmazzamuto/ng2-google-charts/issues
- Funding: https://github.com/gmazzamuto/ng2-google-charts?sponsor=1
- npm.io page: https://npm.io/package/ng2-google-charts

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.3.0

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [@temporal-architect/claude-plugin](https://npm.io/package/@temporal-architect/claude-plugin.md) — 335 weekly downloads

## Recent versions

- 7.0.0 (latest) — 2021-12-11
- 6.2.0 — 2021-12-10
- 6.1.0 — 2020-07-13
- 6.0.1 — 2020-06-24
- 6.0.0 — 2020-04-05
- 5.0.0 — 2020-01-06
- 4.0.0 — 2019-01-27
- 3.5.0 — 2018-11-18
- 3.4.0 — 2018-02-19
- 3.3.0 — 2017-10-21
- 3.2.0 — 2017-09-23
- 3.1.0 — 2017-08-26
- 3.0.1 — 2017-07-22
- 3.0.0 — 2017-06-29
- 2.4.1 — 2017-06-07
- … 11 more at https://npm.io/package/ng2-google-charts/versions

## README

# ng2-google-charts

> Angular Google Charts module

[![NPM Version][npm-image]][npm-url]
[![Downloads][npm-downloads-image]][npm-downloads-url]


## Versions
* Version 6 is built with Angular 9, should work with Angular versions from 8 to
  13.
* Version 7 is built with Angular 12 in Ivy partial compilation mode, works with
  Angular versions from 12 to 13.

## Features
* All chart types
* Dashboard and controls
* Chart Editor
* Formatters
* Events

## Sponsoring

*If you are using this package commercially or if you find it useful, please
consider [sponsoring][donate-url] this project.*

## Install

```bash
npm i --save ng2-google-charts
```

## Quick start
Import the module in your `app.module.ts`:
```ts
import { Ng2GoogleChartsModule } from 'ng2-google-charts';

@NgModule({
  ...
  imports: [
    ...
    Ng2GoogleChartsModule,
  ],
  providers: [
})
export class AppModule { }
```

In your templates, use the `google-chart` component like this:
```html
<google-chart [data]="pieChart"></google-chart>
```
and in the corresponding `.ts` file:
```ts
import { GoogleChartInterface, GoogleChartType } from 'ng2-google-charts';

public pieChart: GoogleChartInterface = {
  chartType: GoogleChartType.PieChart,
  dataTable: [
    ['Task', 'Hours per Day'],
    ['Work',     11],
    ['Eat',      2],
    ['Commute',  2],
    ['Watch TV', 2],
    ['Sleep',    7]
  ],
  //firstRowIsData: true,
  options: {'title': 'Tasks'},
};
```

## Usage & Demo
Check out the [reference documentation][reference] and the [live demo][example-page].

## License

[MIT](LICENSE.md)

[npm-image]: https://img.shields.io/npm/v/ng2-google-charts.svg
[npm-url]: https://npmjs.org/package/ng2-google-charts
[npm-downloads-image]: https://img.shields.io/npm/dm/ng2-google-charts.svg
[npm-downloads-url]: https://npmjs.org/package/ng2-google-charts
[reference]: https://www.devrandom.it/software/ng2-google-charts/additional-documentation/usage.html
[example-page]: https://www.devrandom.it/software/ng2-google-charts/demo
[donate-url]: https://github.com/gmazzamuto/ng2-google-charts?sponsor=1

---
_Source: https://npm.io/package/ng2-google-charts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
