ngx-frappe-chart
Version:
A simple and easy to use angular wrapper on top of frappe for generating awesome graphs.
2 lines • 5.49 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-frappe-chart",["exports","@angular/core"],e):e(t["ngx-frappe-chart"]={},t.ng.core)}(this,function(t,e){"use strict";var n=function(){function t(){}return t.decorators=[{type:e.Component,args:[{selector:"ngx-frappe-charts-heatmap",template:'\n <div\n ngxFrappeChartsHeatmap\n [title]="title"\n [countLabel]="countLabel"\n [discreteDomains]="discreteDomains"\n [colors]="colors"\n [data]="data"\n ></div>\n '}]}],t.propDecorators={data:[{type:e.Input}],title:[{type:e.Input}],countLabel:[{type:e.Input}],discreteDomains:[{type:e.Input}],colors:[{type:e.Input}]},t}(),p=function(){function t(){}return t.decorators=[{type:e.Component,args:[{selector:"ngx-frappe-charts-percentage",template:'\n <div\n ngxFrappeChartsPercentage\n [title]="title"\n [colors]="colors"\n [height]="height"\n [data]="data"\n [type]="type"\n [barOptions]="barOptions"\n ></div>\n '}]}],t.propDecorators={data:[{type:e.Input}],title:[{type:e.Input}],colors:[{type:e.Input}],height:[{type:e.Input}],type:[{type:e.Input}],maxSlices:[{type:e.Input}],barOptions:[{type:e.Input}]},t}(),i=function(){function t(){}return t.decorators=[{type:e.Component,args:[{selector:"ngx-frappe-charts-bar",template:'\n <div\n ngxFrappeChartsAxis\n [title]="title"\n [colors]="colors"\n [height]="height"\n [data]="data"\n [type]="type"\n [isNavigable]="isNavigable"\n [valuesOverPoints]="valuesOverPoints"\n [axisOptions]="axisOptions"\n [tooltipOptions]="tooltipOptions"\n [barOptions]="barOptions"\n [lineOptions]="lineOptions"\n [yMarkers]="yMarkers"\n [yRegions]="yRegions"\n ></div>\n '}]}],t.propDecorators={data:[{type:e.Input}],title:[{type:e.Input}],type:[{type:e.Input}],colors:[{type:e.Input}],height:[{type:e.Input}],isNavigable:[{type:e.Input}],valuesOverPoints:[{type:e.Input}],axisOptions:[{type:e.Input}],tooltipOptions:[{type:e.Input}],barOptions:[{type:e.Input}],lineOptions:[{type:e.Input}],yMarkers:[{type:e.Input}],yRegions:[{type:e.Input}]},t}(),o=function(){function t(t){this.el=t,this.type="heatmap"}return t.prototype.ngOnChanges=function(){new frappe.Chart(this.el.nativeElement,this.getHeatmapInputs())},t.prototype.getHeatmapInputs=function(){var t={};return t.countLabel=this.countLabel,t.discreteDomains=this.discreteDomains,t.colors=this.colors,t.type=this.type,t.title=this.title,t.data=this.data,t},t.decorators=[{type:e.Directive,args:[{selector:"[ngxFrappeChartsHeatmap]"}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={title:[{type:e.Input}],data:[{type:e.Input}],countLabel:[{type:e.Input}],discreteDomains:[{type:e.Input}],colors:[{type:e.Input}]},t}(),a={percentage:"percentage",pie:"pie",bar:"bar",line:"line",axismixed:"axis-mixed"},r=function(){function t(t){this.el=t}return t.prototype.ngOnChanges=function(){new frappe.Chart(this.el.nativeElement,this.getPieInputs())},t.prototype.getPieInputs=function(){var t={};return t.colors=this.colors,t.type=this.type,t.title=this.title,t.data=this.data,t.height=this.height,t.maxSlices=this.maxSlices,this.addBarOptions(t),t},t.prototype.addBarOptions=function(t){this.type===a.percentage&&(t.barOptions=this.barOptions)},t.decorators=[{type:e.Directive,args:[{selector:"[ngxFrappeChartsPercentage]"}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={title:[{type:e.Input}],data:[{type:e.Input}],colors:[{type:e.Input}],height:[{type:e.Input}],type:[{type:e.Input}],maxSlices:[{type:e.Input}],barOptions:[{type:e.Input}]},t}(),s=function(){function t(t){this.el=t}return t.prototype.ngOnChanges=function(){new frappe.Chart(this.el.nativeElement,this.getAxisInputs())},t.prototype.getAxisInputs=function(){var t={};return t.colors=this.colors,t.type=this.type,t.title=this.title,t.height=this.height,t.isNavigable=this.isNavigable,t.valuesOverPoints=this.valuesOverPoints,t.axisOptions=this.axisOptions,t.tooltipOptions=this.tooltipOptions,this.addGraphData(t),this.addLineOptions(t),this.addBarOptions(t),t},t.prototype.addLineOptions=function(t){this.type!==a.line&&this.type!==a.axismixed||(t.lineOptions=this.lineOptions)},t.prototype.addBarOptions=function(t){this.type!==a.bar&&this.type!==a.axismixed||(t.barOptions=this.barOptions)},t.prototype.addGraphData=function(t){var e=this.data;this.yMarkers&&(e.yMarkers=this.yMarkers),this.yRegions&&(e.yRegions=this.yRegions),t.data=e},t.decorators=[{type:e.Directive,args:[{selector:"[ngxFrappeChartsAxis]"}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={data:[{type:e.Input}],type:[{type:e.Input}],title:[{type:e.Input}],colors:[{type:e.Input}],height:[{type:e.Input}],isNavigable:[{type:e.Input}],valuesOverPoints:[{type:e.Input}],axisOptions:[{type:e.Input}],tooltipOptions:[{type:e.Input}],barOptions:[{type:e.Input}],lineOptions:[{type:e.Input}],yMarkers:[{type:e.Input}],yRegions:[{type:e.Input}]},t}(),u=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[],declarations:[n,p,i,o,r,s],exports:[n,p,i]}]}],t}();t.FrappeChartsHeatmapComponent=n,t.FrappeChartsPercentageComponent=p,t.FrappeChartsBarComponent=i,t.FrappeChartsModule=u,t.ɵc=s,t.ɵa=o,t.ɵb=r,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ngx-frappe-chart.umd.min.js.map