New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

ng-amchart

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-amchart

amchart pipe for anguar

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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

import { AmChartModule } from "ng-amchart";
@NgModule({
    imports: [ AmChartModule ]
})

imports amchart service


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);
     }

Keywords

amchart

FAQs

Package last updated on 05 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts