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

ng2-google-charts

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-google-charts - npm Package Compare versions

Comparing version 2.3.0 to 2.4.0

5

bundles/ng2-google-charts.umd.js

@@ -171,6 +171,9 @@ (function webpackUniversalModuleDefinition(root, factory) {

}
_this.wrapper.draw(_this.el.nativeElement.querySelector('div'));
_this.redraw();
});
}
};
GoogleChartComponent.prototype.redraw = function () {
this.wrapper.draw(this.el.nativeElement.querySelector('div'));
};
GoogleChartComponent.prototype.getSelectorBySeriesType = function (seriesType) {

@@ -177,0 +180,0 @@ var selectors = {

2

bundles/ng2-google-charts.umd.min.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/core")):"function"==typeof define&&define.amd?define(["@angular/core"],t):"object"==typeof exports?exports["ng2-google-charts.umd.min"]=t(require("@angular/core")):e["ng2-google-charts.umd.min"]=t(e["@angular/core"])}(this,function(e){return function(e){function t(r){if(o[r])return o[r].exports;var n=o[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var o={};return t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,r){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=5)}([function(t,o){t.exports=e},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.tooltipDOMElement=e}return e.prototype.setPosition=function(t,o){this.tooltipDOMElement.nativeElement.style.left=t+e.PIXELS,this.tooltipDOMElement.nativeElement.style.top=o+e.PIXELS},e.prototype.getDOMElement=function(){return this.tooltipDOMElement},e}();r.PIXELS="px",t.ChartHTMLTooltip=r},function(e,t,o){"use strict";var r=this&&this.__decorate||function(e,t,o,r){var n,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(i=(a<3?n(i):a>3?n(t,o,i):n(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(0),i=o(3),s=o(1),c=function(){function e(e,t){this.el=e,this.loaderService=t,this.chartSelect=new a.EventEmitter,this.chartReady=new a.EventEmitter,this.chartError=new a.EventEmitter,this.mouseOver=new a.EventEmitter,this.eventsLoaded=!1}return e.prototype.ngOnChanges=function(e){var t=this;if(e.data){if(!this.data)return;this.options=this.data.options,this.loaderService.load(this.data.chartType).then(function(){if(void 0===t.wrapper||t.wrapper.getChartType!==t.data.chartType?t.wrapper=new google.visualization.ChartWrapper(t.data):(t.unregisterChartEvents(),t.wrapper.setDataTable(t.data.dataTable),t.wrapper.setOptions(t.options)),t.eventsLoaded||(t.registerChartWrapperEvents(),t.eventsLoaded=!0),void 0!==t.data.formatters)for(var e=0,o=t.data.formatters;e<o.length;e++)for(var r=o[e],n=google.visualization[r.type],a=r.options,i=new n(a),s=0,c=r.columns;s<c.length;s++){var l=c[s];i.format(t.wrapper.getDataTable(),l)}t.wrapper.draw(t.el.nativeElement.querySelector("div"))})}},e.prototype.getSelectorBySeriesType=function(e){return{bars:"bar#%s#%r",haxis:"hAxis#0#label",line:"point#%s#%r",legend:"legendentry#%s"}[e]},e.prototype.getSeriesByColumn=function(e){for(var t=0,o=this.wrapper.getDataTable(),r=e-1;r>=0;r--){var n=o.getColumnRole(r),a=o.getColumnType(r);"data"!==n&&"number"!==a||t++}return t},e.prototype.getBoundingBoxForItem=function(e){var t={top:0,left:0,width:0,height:0};if(this.cli){var o=e.column,r=this.getSeriesByColumn(o),n=(e.row,e.row),a=this.options.seriesType;if(this.options.series&&this.options.series[r]&&this.options.series[r].type&&(a=this.options.series[r].type),a){var i=this.getSelectorBySeriesType(a);if(i){i=i.replace("%s",r+"").replace("%c",o+"").replace("%r",n+"");var s=this.cli.getBoundingBox(i);s&&(t=s)}}}return t},e.prototype.getValueAtPosition=function(e){return null===e.row?null:this.wrapper.getDataTable().getValue(e.row,e.column)},e.prototype.getColumnTypeAtPosition=function(e){return this.wrapper.getDataTable().getColumnType(e.column)||""},e.prototype.getColumnLabelAtPosition=function(e){return this.wrapper.getDataTable().getColumnLabel(e.column)||""},e.prototype.getHTMLTooltip=function(){var e=new a.ElementRef(this.el.nativeElement.querySelector(".google-visualization-tooltip"));return new s.ChartHTMLTooltip(e)},e.prototype.parseMouseOverEvent=function(e){return{position:e,boundingBox:this.getBoundingBoxForItem(e),value:this.getValueAtPosition(e),tooltip:this.getHTMLTooltip(),columnType:this.getColumnTypeAtPosition(e),columnLabel:this.getColumnLabelAtPosition(e)}},e.prototype.unregisterChartEvents=function(){var e=this.wrapper.getChart();google.visualization.events.removeAllListeners(e)},e.prototype.registerChartEvents=function(){var e=this;if(this.mouseOver.observers.length>0){var t=this.wrapper.getChart();this.cli=t.getChartLayoutInterface(),google.visualization.events.addListener(t,"onmouseover",function(t){var o=e.parseMouseOverEvent(t);e.mouseOver.emit(o)})}},e.prototype.registerChartWrapperEvents=function(){var e=this;google.visualization.events.addListener(this.wrapper,"ready",function(){e.chartReady.emit({message:"Chart ready"}),e.registerChartEvents()}),google.visualization.events.addListener(this.wrapper,"error",function(t){e.chartError.emit(t)}),google.visualization.events.addListener(this.wrapper,"select",function(){var t,o=e.wrapper.visualization.getSelection()[0];if(void 0!==o){var r=[];if(null!==o.row)for(var n=e.wrapper.getDataTable(),a=n.getNumberOfColumns(),i=0;i<a;i++)r.push(n.getValue(o.row,i));s={message:"select",row:o.row,column:o.column},s.selectedRowValues=r,t=s}else t={message:"deselect",row:null,column:null,selectedRowValues:[]};e.chartSelect.emit(t);var s})},e}();r([a.Input(),n("design:type",Object)],c.prototype,"data",void 0),r([a.Output(),n("design:type",a.EventEmitter)],c.prototype,"chartReady",void 0),r([a.Output(),n("design:type",a.EventEmitter)],c.prototype,"chartError",void 0),r([a.Output(),n("design:type",a.EventEmitter)],c.prototype,"chartSelect",void 0),r([a.Output(),n("design:type",a.EventEmitter)],c.prototype,"mouseOver",void 0),c=r([a.Component({selector:"google-chart",template:"<div></div>",changeDetection:a.ChangeDetectionStrategy.OnPush}),n("design:paramtypes",[a.ElementRef,i.GoogleChartsLoaderService])],c),t.GoogleChartComponent=c},function(e,t,o){"use strict";var r=this&&this.__decorate||function(e,t,o,r){var n,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(i=(a<3?n(i):a>3?n(t,o,i):n(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(0),i=function(){function e(){this.chartPackage={AnnotationChart:"annotationchart",AreaChart:"corechart",Bar:"bar",BarChart:"corechart",BubbleChart:"corechart",Calendar:"calendar",CandlestickChart:"corechart",ColumnChart:"corechart",ComboChart:"corechart",PieChart:"corechart",Gantt:"gantt",Gauge:"gauge",GeoChart:"geochart",Histogram:"corechart",Line:"line",LineChart:"corechart",Map:"map",OrgChart:"orgchart",Sankey:"sankey",Scatter:"scatter",ScatterChart:"corechart",SteppedAreaChart:"corechart",Table:"table",Timeline:"timeline",TreeMap:"treemap",WordTree:"wordtree"},this.googleScriptLoadingNotifier=new a.EventEmitter,this.googleScriptIsLoading=!1}return e.prototype.load=function(e){var t=this;return new Promise(function(o,r){void 0===o&&(o=Function.prototype),void 0===r&&(r=Function.prototype),t.loadGoogleChartsScript().then(function(){google.charts.load("45",{packages:[t.chartPackage[e]],callback:o})}).catch(function(){console.error("Google charts script could not be loaded")})})},e.prototype.loadGoogleChartsScript=function(){var e=this;return new Promise(function(t,o){if(void 0===t&&(t=Function.prototype),void 0===o&&(o=Function.prototype),"undefined"!=typeof google&&google.charts)t();else if(e.googleScriptIsLoading)e.googleScriptLoadingNotifier.subscribe(function(e){e?t():o()});else{e.googleScriptIsLoading=!0;var r=document.createElement("script");r.type="text/javascript",r.src="https://www.gstatic.com/charts/loader.js",r.async=!0,r.defer=!0,r.onload=function(){e.googleScriptIsLoading=!1,e.googleScriptLoadingNotifier.emit(!0),t()},r.onerror=function(){e.googleScriptIsLoading=!1,e.googleScriptLoadingNotifier.emit(!1),o()},document.getElementsByTagName("head")[0].appendChild(r)}})},e}();i=r([a.Injectable(),n("design:paramtypes",[])],i),t.GoogleChartsLoaderService=i},function(e,t,o){"use strict";var r=this&&this.__decorate||function(e,t,o,r){var n,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(i=(a<3?n(i):a>3?n(t,o,i):n(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i};Object.defineProperty(t,"__esModule",{value:!0});var n=o(0),a=o(2),i=o(3),s=function(){function e(){}return e}();s=r([n.NgModule({declarations:[a.GoogleChartComponent],providers:[i.GoogleChartsLoaderService],exports:[a.GoogleChartComponent]})],s),t.Ng2GoogleChartsModule=s},function(e,t,o){"use strict";function r(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0}),r(o(2));var n=o(1);t.ChartHTMLTooltip=n.ChartHTMLTooltip;var a=o(4);t.Ng2GoogleChartsModule=a.Ng2GoogleChartsModule}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/core")):"function"==typeof define&&define.amd?define(["@angular/core"],t):"object"==typeof exports?exports["ng2-google-charts.umd.min"]=t(require("@angular/core")):e["ng2-google-charts.umd.min"]=t(e["@angular/core"])}(this,function(e){return function(e){function t(r){if(o[r])return o[r].exports;var n=o[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var o={};return t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,r){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=5)}([function(t,o){t.exports=e},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.tooltipDOMElement=e}return e.prototype.setPosition=function(t,o){this.tooltipDOMElement.nativeElement.style.left=t+e.PIXELS,this.tooltipDOMElement.nativeElement.style.top=o+e.PIXELS},e.prototype.getDOMElement=function(){return this.tooltipDOMElement},e}();r.PIXELS="px",t.ChartHTMLTooltip=r},function(e,t,o){"use strict";var r=this&&this.__decorate||function(e,t,o,r){var n,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(i=(a<3?n(i):a>3?n(t,o,i):n(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(0),i=o(3),s=o(1),c=function(){function e(e,t){this.el=e,this.loaderService=t,this.chartSelect=new a.EventEmitter,this.chartReady=new a.EventEmitter,this.chartError=new a.EventEmitter,this.mouseOver=new a.EventEmitter,this.eventsLoaded=!1}return e.prototype.ngOnChanges=function(e){var t=this;if(e.data){if(!this.data)return;this.options=this.data.options,this.loaderService.load(this.data.chartType).then(function(){if(void 0===t.wrapper||t.wrapper.getChartType!==t.data.chartType?t.wrapper=new google.visualization.ChartWrapper(t.data):(t.unregisterChartEvents(),t.wrapper.setDataTable(t.data.dataTable),t.wrapper.setOptions(t.options)),t.eventsLoaded||(t.registerChartWrapperEvents(),t.eventsLoaded=!0),void 0!==t.data.formatters)for(var e=0,o=t.data.formatters;e<o.length;e++)for(var r=o[e],n=google.visualization[r.type],a=r.options,i=new n(a),s=0,c=r.columns;s<c.length;s++){var l=c[s];i.format(t.wrapper.getDataTable(),l)}t.redraw()})}},e.prototype.redraw=function(){this.wrapper.draw(this.el.nativeElement.querySelector("div"))},e.prototype.getSelectorBySeriesType=function(e){return{bars:"bar#%s#%r",haxis:"hAxis#0#label",line:"point#%s#%r",legend:"legendentry#%s"}[e]},e.prototype.getSeriesByColumn=function(e){for(var t=0,o=this.wrapper.getDataTable(),r=e-1;r>=0;r--){var n=o.getColumnRole(r),a=o.getColumnType(r);"data"!==n&&"number"!==a||t++}return t},e.prototype.getBoundingBoxForItem=function(e){var t={top:0,left:0,width:0,height:0};if(this.cli){var o=e.column,r=this.getSeriesByColumn(o),n=(e.row,e.row),a=this.options.seriesType;if(this.options.series&&this.options.series[r]&&this.options.series[r].type&&(a=this.options.series[r].type),a){var i=this.getSelectorBySeriesType(a);if(i){i=i.replace("%s",r+"").replace("%c",o+"").replace("%r",n+"");var s=this.cli.getBoundingBox(i);s&&(t=s)}}}return t},e.prototype.getValueAtPosition=function(e){return null===e.row?null:this.wrapper.getDataTable().getValue(e.row,e.column)},e.prototype.getColumnTypeAtPosition=function(e){return this.wrapper.getDataTable().getColumnType(e.column)||""},e.prototype.getColumnLabelAtPosition=function(e){return this.wrapper.getDataTable().getColumnLabel(e.column)||""},e.prototype.getHTMLTooltip=function(){var e=new a.ElementRef(this.el.nativeElement.querySelector(".google-visualization-tooltip"));return new s.ChartHTMLTooltip(e)},e.prototype.parseMouseOverEvent=function(e){return{position:e,boundingBox:this.getBoundingBoxForItem(e),value:this.getValueAtPosition(e),tooltip:this.getHTMLTooltip(),columnType:this.getColumnTypeAtPosition(e),columnLabel:this.getColumnLabelAtPosition(e)}},e.prototype.unregisterChartEvents=function(){var e=this.wrapper.getChart();google.visualization.events.removeAllListeners(e)},e.prototype.registerChartEvents=function(){var e=this;if(this.mouseOver.observers.length>0){var t=this.wrapper.getChart();this.cli=t.getChartLayoutInterface(),google.visualization.events.addListener(t,"onmouseover",function(t){var o=e.parseMouseOverEvent(t);e.mouseOver.emit(o)})}},e.prototype.registerChartWrapperEvents=function(){var e=this;google.visualization.events.addListener(this.wrapper,"ready",function(){e.chartReady.emit({message:"Chart ready"}),e.registerChartEvents()}),google.visualization.events.addListener(this.wrapper,"error",function(t){e.chartError.emit(t)}),google.visualization.events.addListener(this.wrapper,"select",function(){var t,o=e.wrapper.visualization.getSelection()[0];if(void 0!==o){var r=[];if(null!==o.row)for(var n=e.wrapper.getDataTable(),a=n.getNumberOfColumns(),i=0;i<a;i++)r.push(n.getValue(o.row,i));s={message:"select",row:o.row,column:o.column},s.selectedRowValues=r,t=s}else t={message:"deselect",row:null,column:null,selectedRowValues:[]};e.chartSelect.emit(t);var s})},e}();r([a.Input(),n("design:type",Object)],c.prototype,"data",void 0),r([a.Output(),n("design:type",a.EventEmitter)],c.prototype,"chartReady",void 0),r([a.Output(),n("design:type",a.EventEmitter)],c.prototype,"chartError",void 0),r([a.Output(),n("design:type",a.EventEmitter)],c.prototype,"chartSelect",void 0),r([a.Output(),n("design:type",a.EventEmitter)],c.prototype,"mouseOver",void 0),c=r([a.Component({selector:"google-chart",template:"<div></div>",changeDetection:a.ChangeDetectionStrategy.OnPush}),n("design:paramtypes",[a.ElementRef,i.GoogleChartsLoaderService])],c),t.GoogleChartComponent=c},function(e,t,o){"use strict";var r=this&&this.__decorate||function(e,t,o,r){var n,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(i=(a<3?n(i):a>3?n(t,o,i):n(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(0),i=function(){function e(){this.chartPackage={AnnotationChart:"annotationchart",AreaChart:"corechart",Bar:"bar",BarChart:"corechart",BubbleChart:"corechart",Calendar:"calendar",CandlestickChart:"corechart",ColumnChart:"corechart",ComboChart:"corechart",PieChart:"corechart",Gantt:"gantt",Gauge:"gauge",GeoChart:"geochart",Histogram:"corechart",Line:"line",LineChart:"corechart",Map:"map",OrgChart:"orgchart",Sankey:"sankey",Scatter:"scatter",ScatterChart:"corechart",SteppedAreaChart:"corechart",Table:"table",Timeline:"timeline",TreeMap:"treemap",WordTree:"wordtree"},this.googleScriptLoadingNotifier=new a.EventEmitter,this.googleScriptIsLoading=!1}return e.prototype.load=function(e){var t=this;return new Promise(function(o,r){void 0===o&&(o=Function.prototype),void 0===r&&(r=Function.prototype),t.loadGoogleChartsScript().then(function(){google.charts.load("45",{packages:[t.chartPackage[e]],callback:o})}).catch(function(){console.error("Google charts script could not be loaded")})})},e.prototype.loadGoogleChartsScript=function(){var e=this;return new Promise(function(t,o){if(void 0===t&&(t=Function.prototype),void 0===o&&(o=Function.prototype),"undefined"!=typeof google&&google.charts)t();else if(e.googleScriptIsLoading)e.googleScriptLoadingNotifier.subscribe(function(e){e?t():o()});else{e.googleScriptIsLoading=!0;var r=document.createElement("script");r.type="text/javascript",r.src="https://www.gstatic.com/charts/loader.js",r.async=!0,r.defer=!0,r.onload=function(){e.googleScriptIsLoading=!1,e.googleScriptLoadingNotifier.emit(!0),t()},r.onerror=function(){e.googleScriptIsLoading=!1,e.googleScriptLoadingNotifier.emit(!1),o()},document.getElementsByTagName("head")[0].appendChild(r)}})},e}();i=r([a.Injectable(),n("design:paramtypes",[])],i),t.GoogleChartsLoaderService=i},function(e,t,o){"use strict";var r=this&&this.__decorate||function(e,t,o,r){var n,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(i=(a<3?n(i):a>3?n(t,o,i):n(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i};Object.defineProperty(t,"__esModule",{value:!0});var n=o(0),a=o(2),i=o(3),s=function(){function e(){}return e}();s=r([n.NgModule({declarations:[a.GoogleChartComponent],providers:[i.GoogleChartsLoaderService],exports:[a.GoogleChartComponent]})],s),t.Ng2GoogleChartsModule=s},function(e,t,o){"use strict";function r(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0}),r(o(2));var n=o(1);t.ChartHTMLTooltip=n.ChartHTMLTooltip;var a=o(4);t.Ng2GoogleChartsModule=a.Ng2GoogleChartsModule}])});

@@ -13,3 +13,3 @@ import { ElementRef, OnChanges, SimpleChanges, EventEmitter } from '@angular/core';

mouseOver: EventEmitter<MouseOverEvent>;
private wrapper;
wrapper: any;
private cli;

@@ -22,2 +22,3 @@ private options;

ngOnChanges(changes: SimpleChanges): void;
redraw(): void;
private getSelectorBySeriesType(seriesType);

@@ -24,0 +25,0 @@ /**

@@ -49,6 +49,9 @@ "use strict";

}
_this.wrapper.draw(_this.el.nativeElement.querySelector('div'));
_this.redraw();
});
}
};
GoogleChartComponent.prototype.redraw = function () {
this.wrapper.draw(this.el.nativeElement.querySelector('div'));
};
GoogleChartComponent.prototype.getSelectorBySeriesType = function (seriesType) {

@@ -55,0 +58,0 @@ var selectors = {

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":3,"metadata":{"GoogleChartComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"google-chart","template":"<div></div>","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"}}]}],"members":{"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"chartReady":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartError":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartSelect":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"mouseOver":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"../google-charts-loader.service","name":"GoogleChartsLoaderService"}]}],"ngOnChanges":[{"__symbolic":"method"}],"getSelectorBySeriesType":[{"__symbolic":"method"}],"getSeriesByColumn":[{"__symbolic":"method"}],"getBoundingBoxForItem":[{"__symbolic":"method"}],"getValueAtPosition":[{"__symbolic":"method"}],"getColumnTypeAtPosition":[{"__symbolic":"method"}],"getColumnLabelAtPosition":[{"__symbolic":"method"}],"getHTMLTooltip":[{"__symbolic":"method"}],"parseMouseOverEvent":[{"__symbolic":"method"}],"unregisterChartEvents":[{"__symbolic":"method"}],"registerChartEvents":[{"__symbolic":"method"}],"registerChartWrapperEvents":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GoogleChartComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"google-chart","template":"<div></div>","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"}}]}],"members":{"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"chartReady":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartError":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartSelect":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"mouseOver":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"../google-charts-loader.service","name":"GoogleChartsLoaderService"}]}],"ngOnChanges":[{"__symbolic":"method"}],"getSelectorBySeriesType":[{"__symbolic":"method"}],"getSeriesByColumn":[{"__symbolic":"method"}],"getBoundingBoxForItem":[{"__symbolic":"method"}],"getValueAtPosition":[{"__symbolic":"method"}],"getColumnTypeAtPosition":[{"__symbolic":"method"}],"getColumnLabelAtPosition":[{"__symbolic":"method"}],"getHTMLTooltip":[{"__symbolic":"method"}],"parseMouseOverEvent":[{"__symbolic":"method"}],"unregisterChartEvents":[{"__symbolic":"method"}],"registerChartEvents":[{"__symbolic":"method"}],"registerChartWrapperEvents":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":3,"metadata":{"GoogleChartComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"google-chart","template":"<div></div>","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"}}]}],"members":{"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"chartReady":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartError":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartSelect":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"mouseOver":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"../google-charts-loader.service","name":"GoogleChartsLoaderService"}]}],"ngOnChanges":[{"__symbolic":"method"}],"redraw":[{"__symbolic":"method"}],"getSelectorBySeriesType":[{"__symbolic":"method"}],"getSeriesByColumn":[{"__symbolic":"method"}],"getBoundingBoxForItem":[{"__symbolic":"method"}],"getValueAtPosition":[{"__symbolic":"method"}],"getColumnTypeAtPosition":[{"__symbolic":"method"}],"getColumnLabelAtPosition":[{"__symbolic":"method"}],"getHTMLTooltip":[{"__symbolic":"method"}],"parseMouseOverEvent":[{"__symbolic":"method"}],"unregisterChartEvents":[{"__symbolic":"method"}],"registerChartEvents":[{"__symbolic":"method"}],"registerChartWrapperEvents":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GoogleChartComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"google-chart","template":"<div></div>","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"}}]}],"members":{"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"chartReady":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartError":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartSelect":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"mouseOver":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"../google-charts-loader.service","name":"GoogleChartsLoaderService"}]}],"ngOnChanges":[{"__symbolic":"method"}],"redraw":[{"__symbolic":"method"}],"getSelectorBySeriesType":[{"__symbolic":"method"}],"getSeriesByColumn":[{"__symbolic":"method"}],"getBoundingBoxForItem":[{"__symbolic":"method"}],"getValueAtPosition":[{"__symbolic":"method"}],"getColumnTypeAtPosition":[{"__symbolic":"method"}],"getColumnLabelAtPosition":[{"__symbolic":"method"}],"getHTMLTooltip":[{"__symbolic":"method"}],"parseMouseOverEvent":[{"__symbolic":"method"}],"unregisterChartEvents":[{"__symbolic":"method"}],"registerChartEvents":[{"__symbolic":"method"}],"registerChartWrapperEvents":[{"__symbolic":"method"}]}}}}]
{
"main": "bundles/ng2-google-charts.umd.js",
"version": "2.3.0",
"version": "2.4.0",
"description": "Angular2 Google Charts module",

@@ -31,4 +31,4 @@ "module": "index.js",

},
"_id": "ng2-google-charts@2.3.0",
"_id": "ng2-google-charts@2.4.0",
"devDependencies": {}
}

@@ -34,7 +34,7 @@ # ng2-google-charts

```html
<google-chart [data]="pieChartOptions"></google-chart>
<google-chart [data]="pieChartData"></google-chart>
```
and in the corresponding `.ts` file:
```ts
pieChartOptions = {
pieChartData = {
chartType: 'PieChart',

@@ -58,3 +58,3 @@ dataTable: [

```ts
public tableChartOptions = {
public tableChartData = {
chartType: 'Table',

@@ -95,3 +95,3 @@ dataTable: [

```html
<google-chart [data]='pieChartOptions' (chartReady)='ready($event)'></google-chart>
<google-chart [data]='pieChartData' (chartReady)='ready($event)'></google-chart>
```

@@ -124,3 +124,3 @@

```html
<google-chart [data]='pieChartOptions' (chartError)='error($event)'></google-chart>
<google-chart [data]='pieChartData' (chartError)='error($event)'></google-chart>
```

@@ -158,3 +158,3 @@

```html
<google-chart [data]='pieChartOptions' (chartSelect)='select($event)'></google-chart>
<google-chart [data]='pieChartData' (chartSelect)='select($event)'></google-chart>
```

@@ -191,3 +191,3 @@

```html
<google-chart [data]="comboChartOptions" (mouseOver)="mouseOver($event)"></google-chart>
<google-chart [data]="comboChartData" (mouseOver)="mouseOver($event)"></google-chart>
```

@@ -219,2 +219,26 @@

# Advanced usage
You can access Google Chart's underlying [ChartWrapper](https://developers.google.com/chart/interactive/docs/reference#chartwrapperobject) through the
`wrapper` property of the component object:
```html
<google-chart #cchart [data]="columnChartData"></google-chart>
```
```ts
import {ViewChild} from '@angular/core';
export class AppComponent {
@ViewChild('cchart') cchart;
myfunction() {
let googleChartWrapper = this.cchart.wrapper;
//force a redraw
this.cchart.redraw();
}
}
```
## License

@@ -221,0 +245,0 @@

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