Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular2-google-chart

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-google-chart - npm Package Compare versions

Comparing version 2.2.4 to 2.2.5

2

directives/angular2-google-chart.directive.js

@@ -62,3 +62,3 @@ System.register(["@angular/core"], function (exports_1, context_1) {

core_1.Directive({
selector: '[GoogleChart]',
selector: '[GoogleChart]'
}),

@@ -65,0 +65,0 @@ __metadata("design:paramtypes", [core_1.ElementRef])

import {Directive, ElementRef, Input, OnChanges} from '@angular/core';
declare var google: any;
declare var googleLoaded: any;
declare var googleChartsPackagesToLoad: any;
declare let google: any;
declare let googleLoaded: any;
declare let googleChartsPackagesToLoad: any;
@Directive({
selector: '[GoogleChart]',
// properties: [
// 'chartType',
// 'chartOptions',
// 'chartData'
// ]
selector: '[GoogleChart]'
})
export class GoogleChart implements OnChanges {
public _element:any;
@Input('chartType') public chartType:string;
public _element: any;
@Input('chartType') public chartType: string;
@Input('chartOptions') public chartOptions: Object;

@@ -24,21 +19,21 @@ @Input('chartData') public chartData: Object;

ngOnChanges() {
if(!googleLoaded) {
if (!googleLoaded) {
googleLoaded = true;
google.charts.load('current', {'packages':['corechart', 'gauge']['orgchart']});
}
setTimeout(() =>this.drawGraph(this.chartOptions,this.chartType,this.chartData,this._element),1000);
google.charts.load('current', { 'packages': ['corechart', 'gauge']['orgchart'] });
}
setTimeout(() => this.drawGraph(this.chartOptions, this.chartType, this.chartData, this._element), 1000);
}
drawGraph (chartOptions,chartType,chartData,ele) {
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var wrapper;
wrapper = new google.visualization.ChartWrapper({
chartType: chartType,
dataTable:chartData ,
options:chartOptions || {}
});
drawGraph(chartOptions, chartType, chartData, ele) {
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var wrapper;
wrapper = new google.visualization.ChartWrapper({
chartType: chartType,
dataTable: chartData,
options: chartOptions || {}
});
wrapper.draw(ele);
}
}
}
}
{
"name": "angular2-google-chart",
"version": "2.2.4",
"version": "2.2.5",
"description": "google chart directive for angular2",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc