# ng-amchart

> amchart pipe for anguar

Latest version **1.0.1** (published 2018-06-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install ng-amchart
pnpm add ng-amchart
yarn add ng-amchart
bun add ng-amchart
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-06-05 |
| First published | 2018-02-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 383.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | pondol |
| Maintainers | pondol |
| Keywords | amchart, pipe, angular |

## Links

- npm: https://www.npmjs.com/package/ng-amchart
- Repository: https://github.com/wangta69/ng-amchart
- Homepage: https://github.com/wangta69/ng-amchart#readme
- Issues: https://github.com/wangta69/ng-amchart/issues
- npm.io page: https://npm.io/package/ng-amchart

## Dependencies (1)

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

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-06-05
- 1.0.0 — 2018-02-27

## README

# ng-amchart
Tested for angular5

## Installation
```
npm install ng-amchart
```

Add amcharts.js to index.html
```
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/serial.js"></script><!-- must be before amstock -->
<script src="https://www.amcharts.com/lib/3/amstock.js"></script>
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
```
## How to use

### imports amchart module
``` app.module.ts
import { AmChartModule } from "ng-amchart";
@NgModule({
    imports: [ AmChartModule ]
})
```

### imports amchart service
``` app.module.ts

import { AmChartsService } from "ng-amchart";
export class myPage
private chart:any;
constructor( protected amchartSvc:AmChartsService) {}

    ngAfterViewInit() {

     this.chart = this.amchartSvc.makeChart("chartdiv", {
       "type": "serial",
       "theme": "light",
       "categoryField": "category",
       "graphs": [
   {
     "valueField": "value"
   }
 ],
       "dataProvider": [ {
             "category": "item1",
             "value": 8,

           },
           {
             "category": "item2",
             "value": 4,
           },
           {
             "category": "item3",
             "value": 15,
           },
           {
             "category": "item4",
             "value": 4,
           }]
     });
   }


   ngOnDestroy() {
     if (this.chart) {
       this.amchartSvc.destroyChart(this.chart);
     }
```

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