UNPKG

ng-apexcharts

Version:
2 lines 3.69 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("rxjs")):"function"==typeof define&&define.amd?define("ng-apexcharts",["exports","@angular/core","rxjs"],e):e(t["ng-apexcharts"]={},t.ng.core,t.rxjs)}(this,function(t,e,i){"use strict";function s(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var s,n,r=i.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(s=r.next()).done;)o.push(s.value)}catch(a){n={error:a}}finally{try{s&&!s.done&&(i=r["return"])&&i.call(r)}finally{if(n)throw n.error}}return o}function n(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}var r=function(){function t(){this.dataLabels={enabled:!1},this.stroke={curve:"straight"},this.grid={row:{colors:["#f3f3f3","transparent"],opacity:.5}},this.autoUpdateSeries=!0}return t.prototype.ngOnInit=function(){var t=this;i.asapScheduler.schedule(function(){t.createElement()})},t.prototype.ngOnChanges=function(t){var e=this;i.asapScheduler.schedule(function(){e.autoUpdateSeries&&0===Object.keys(t).filter(function(t){return"series"!==t}).length?e.updateSeries(e.series,!0):e.createElement()})},t.prototype.createElement=function(){var t={};this.annotations&&(t.annotations=this.annotations),this.chart&&(t.chart=this.chart),this.colors&&(t.colors=this.colors),this.dataLabels&&(t.dataLabels=this.dataLabels),this.series&&(t.series=this.series),this.stroke&&(t.stroke=this.stroke),this.labels&&(t.labels=this.labels),this.legend&&(t.legend=this.legend),this.fill&&(t.fill=this.fill),this.tooltip&&(t.tooltip=this.tooltip),this.plotOptions&&(t.plotOptions=this.plotOptions),this.responsive&&(t.responsive=this.responsive),this.xaxis&&(t.xaxis=this.xaxis),this.yaxis&&(t.yaxis=this.yaxis),this.grid&&(t.grid=this.grid),this.states&&(t.states=this.states),this.title&&(t.title=this.title),this.subtitle&&(t.subtitle=this.subtitle),this.theme&&(t.theme=this.theme),this.chartObj&&this.chartObj.destroy(),this.chartObj=new ApexCharts(this.chartElement.nativeElement,t),this.render()},t.prototype.render=function(){return this.chartObj.render()},t.prototype.updateOptions=function(t,e,i){return this.chartObj.updateOptions(t,e,i)},t.prototype.updateSeries=function(t,e){this.chartObj.updateSeries(t,e)},t.prototype.toggleSeries=function(t){this.chartObj.toggleSeries(t)},t.prototype.addXaxisAnnotation=function(t,e,i){this.chartObj.addXaxisAnnotation(t,e,i)},t.prototype.addYaxisAnnotation=function(t,e,i){this.chartObj.addYaxisAnnotation(t,e,i)},t.prototype.addPointAnnotation=function(t,e,i){this.chartObj.addPointAnnotation(t,e,i)},t.prototype.addText=function(t,e,i){this.chartObj.addText(t,e,i)},t.prototype.dataURI=function(){return this.chartObj.dataURI()},t.decorators=[{type:e.Component,args:[{selector:"apx-chart",template:"<div #chart></div>\n",styles:[""]}]}],t.propDecorators={chart:[{type:e.Input}],annotations:[{type:e.Input}],colors:[{type:e.Input}],dataLabels:[{type:e.Input}],series:[{type:e.Input}],stroke:[{type:e.Input}],labels:[{type:e.Input}],legend:[{type:e.Input}],fill:[{type:e.Input}],tooltip:[{type:e.Input}],plotOptions:[{type:e.Input}],responsive:[{type:e.Input}],xaxis:[{type:e.Input}],yaxis:[{type:e.Input}],grid:[{type:e.Input}],states:[{type:e.Input}],title:[{type:e.Input}],subtitle:[{type:e.Input}],theme:[{type:e.Input}],autoUpdateSeries:[{type:e.Input}],chartElement:[{type:e.ViewChild,args:["chart"]}]},t}(),o=[r],a=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:n(o),imports:[],exports:n(o)}]}],t}();t.NgApexchartsModule=a,t.ChartComponent=r,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=ng-apexcharts.umd.min.js.map