ngx-echarts
Advanced tools
Comparing version 2.0.2 to 2.1.0
@@ -58,2 +58,3 @@ (function (global, factory) { | ||
this.autoResize = true; | ||
this.loadingType = 'default'; | ||
// chart events: | ||
@@ -82,3 +83,4 @@ this.chartInit = new core.EventEmitter(); | ||
var /** @type {?} */ prop = window.getComputedStyle(dom, null).getPropertyValue('height'); | ||
if (!prop || prop === '0px') { | ||
if ((!prop || prop === '0px') && | ||
(!dom.style.height || dom.style.height === '0px')) { | ||
dom.style.height = '400px'; | ||
@@ -172,3 +174,3 @@ } | ||
if (this._chart) { | ||
loading ? this._chart.showLoading() : this._chart.hideLoading(); | ||
loading ? this._chart.showLoading(this.loadingType, this.loadingOpts) : this._chart.hideLoading(); | ||
} | ||
@@ -207,2 +209,4 @@ }; | ||
'autoResize': [{ type: core.Input },], | ||
'loadingType': [{ type: core.Input },], | ||
'loadingOpts': [{ type: core.Input },], | ||
'chartInit': [{ type: core.Output },], | ||
@@ -209,0 +213,0 @@ 'chartClick': [{ type: core.Output },], |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("rxjs/Observable"),require("rxjs/add/observable/of"),require("rxjs/add/observable/empty")):"function"==typeof define&&define.amd?define(["exports","@angular/core","rxjs/Observable","rxjs/add/observable/of","rxjs/add/observable/empty"],e):e(t["ngx-echarts"]={},t.ng.core,t.Rx)}(this,function(t,e,n){"use strict";var r=function(){function t(t){this._changes=t}return t.of=function(e){return new t(e)},t.prototype.notEmpty=function(t){if(this._changes[t]){var e=this._changes[t].currentValue;if(e!==undefined&&null!==e)return n.Observable.of(e)}return n.Observable.empty()},t.prototype.has=function(t){if(this._changes[t]){var e=this._changes[t].currentValue;return n.Observable.of(e)}return n.Observable.empty()},t}(),o=function(){function t(t,n){this.el=t,this._ngZone=n,this.autoResize=!0,this.chartInit=new e.EventEmitter,this.chartClick=new e.EventEmitter,this.chartDblClick=new e.EventEmitter,this.chartMouseDown=new e.EventEmitter,this.chartMouseUp=new e.EventEmitter,this.chartMouseOver=new e.EventEmitter,this.chartMouseOut=new e.EventEmitter,this.chartGlobalOut=new e.EventEmitter,this.chartContextMenu=new e.EventEmitter,this.chartDataZoom=new e.EventEmitter,this._chart=null,this.currentWindowWidth=null}return t.prototype.createChart=function(){var t=this;this.currentWindowWidth=window.innerWidth;var e=this.el.nativeElement;if(window&&window.getComputedStyle){var n=window.getComputedStyle(e,null).getPropertyValue("height");n&&"0px"!==n||(e.style.height="400px")}return this._ngZone.runOutsideAngular(function(){return echarts.init(e,t.theme||undefined,t.initOpts||undefined)})},t.prototype.onWindowResize=function(t){this.autoResize&&t.target.innerWidth!==this.currentWindowWidth&&(this.currentWindowWidth=t.target.innerWidth,this._chart&&this._chart.resize())},t.prototype.ngOnChanges=function(t){var e=this,n=r.of(t);n.notEmpty("options").subscribe(function(t){return e.onOptionsChange(t)}),n.notEmpty("merge").subscribe(function(t){return e.setOption(t)}),n.has("loading").subscribe(function(t){return e.toggleLoading(!!t)})},t.prototype.ngOnDestroy=function(){this._chart&&(this._chart.dispose(),this._chart=null)},t.prototype.onOptionsChange=function(t){t&&(this._chart||(this._chart=this.createChart(),this.chartInit.emit(this._chart),this.registerEvents(this._chart)),this._chart.setOption(this.options,!0),this._chart.resize())},t.prototype.registerEvents=function(t){var e=this;t&&(t.on("click",function(t){return e._ngZone.run(function(){return e.chartClick.emit(t)})}),t.on("dblClick",function(t){return e._ngZone.run(function(){return e.chartDblClick.emit(t)})}),t.on("mousedown",function(t){return e._ngZone.run(function(){return e.chartMouseDown.emit(t)})}),t.on("mouseup",function(t){return e._ngZone.run(function(){return e.chartMouseUp.emit(t)})}),t.on("mouseover",function(t){return e._ngZone.run(function(){return e.chartMouseOver.emit(t)})}),t.on("mouseout",function(t){return e._ngZone.run(function(){return e.chartMouseOut.emit(t)})}),t.on("globalout",function(t){return e._ngZone.run(function(){return e.chartGlobalOut.emit(t)})}),t.on("contextmenu",function(t){return e._ngZone.run(function(){return e.chartContextMenu.emit(t)})}),t.on("datazoom",function(t){return e._ngZone.run(function(){return e.chartDataZoom.emit(t)})}))},t.prototype.clear=function(){this._chart&&this._chart.clear()},t.prototype.toggleLoading=function(t){this._chart&&(t?this._chart.showLoading():this._chart.hideLoading())},t.prototype.setOption=function(t,e){this._chart&&this._chart.setOption(t,e)},t}();o.decorators=[{type:e.Directive,args:[{selector:"echarts, [echarts]"}]}],o.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone}]},o.propDecorators={options:[{type:e.Input}],theme:[{type:e.Input}],loading:[{type:e.Input}],initOpts:[{type:e.Input}],merge:[{type:e.Input}],autoResize:[{type:e.Input}],chartInit:[{type:e.Output}],chartClick:[{type:e.Output}],chartDblClick:[{type:e.Output}],chartMouseDown:[{type:e.Output}],chartMouseUp:[{type:e.Output}],chartMouseOver:[{type:e.Output}],chartMouseOut:[{type:e.Output}],chartGlobalOut:[{type:e.Output}],chartContextMenu:[{type:e.Output}],chartDataZoom:[{type:e.Output}],onWindowResize:[{type:e.HostListener,args:["window:resize",["$event"]]}]};var i=function(){function t(){}return Object.defineProperty(t.prototype,"echarts",{get:function(){return echarts},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphic",{get:function(){return this._checkEcharts()?echarts.graphic:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"init",{get:function(){return this._checkEcharts()?echarts.init:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"connect",{get:function(){return this._checkEcharts()?echarts.connect:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disconnect",{get:function(){return this._checkEcharts()?echarts.disconnect:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dispose",{get:function(){return this._checkEcharts()?echarts.dispose:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getInstanceByDom",{get:function(){return this._checkEcharts()?echarts.getInstanceByDom:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"registerMap",{get:function(){return this._checkEcharts()?echarts.registerMap:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getMap",{get:function(){return this._checkEcharts()?echarts.getMap:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"registerTheme",{get:function(){return this._checkEcharts()?echarts.registerTheme:undefined},enumerable:!0,configurable:!0}),t.prototype._checkEcharts=function(){return!!echarts||(console.error("[ngx-echarts] global ECharts not loaded"),!1)},t}();i.decorators=[{type:e.Injectable}],i.ctorParameters=function(){return[]};var u=function(){return function(){}}();u.decorators=[{type:e.NgModule,args:[{declarations:[o],exports:[o],providers:[i]}]}],u.ctorParameters=function(){return[]},t.NgxEchartsModule=u,t.NgxEchartsDirective=o,t.NgxEchartsService=i,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("rxjs/Observable"),require("rxjs/add/observable/of"),require("rxjs/add/observable/empty")):"function"==typeof define&&define.amd?define(["exports","@angular/core","rxjs/Observable","rxjs/add/observable/of","rxjs/add/observable/empty"],e):e(t["ngx-echarts"]={},t.ng.core,t.Rx)}(this,function(t,e,n){"use strict";var r=function(){function t(t){this._changes=t}return t.of=function(e){return new t(e)},t.prototype.notEmpty=function(t){if(this._changes[t]){var e=this._changes[t].currentValue;if(e!==undefined&&null!==e)return n.Observable.of(e)}return n.Observable.empty()},t.prototype.has=function(t){if(this._changes[t]){var e=this._changes[t].currentValue;return n.Observable.of(e)}return n.Observable.empty()},t}(),o=function(){function t(t,n){this.el=t,this._ngZone=n,this.autoResize=!0,this.loadingType="default",this.chartInit=new e.EventEmitter,this.chartClick=new e.EventEmitter,this.chartDblClick=new e.EventEmitter,this.chartMouseDown=new e.EventEmitter,this.chartMouseUp=new e.EventEmitter,this.chartMouseOver=new e.EventEmitter,this.chartMouseOut=new e.EventEmitter,this.chartGlobalOut=new e.EventEmitter,this.chartContextMenu=new e.EventEmitter,this.chartDataZoom=new e.EventEmitter,this._chart=null,this.currentWindowWidth=null}return t.prototype.createChart=function(){var t=this;this.currentWindowWidth=window.innerWidth;var e=this.el.nativeElement;if(window&&window.getComputedStyle){var n=window.getComputedStyle(e,null).getPropertyValue("height");n&&"0px"!==n||e.style.height&&"0px"!==e.style.height||(e.style.height="400px")}return this._ngZone.runOutsideAngular(function(){return echarts.init(e,t.theme||undefined,t.initOpts||undefined)})},t.prototype.onWindowResize=function(t){this.autoResize&&t.target.innerWidth!==this.currentWindowWidth&&(this.currentWindowWidth=t.target.innerWidth,this._chart&&this._chart.resize())},t.prototype.ngOnChanges=function(t){var e=this,n=r.of(t);n.notEmpty("options").subscribe(function(t){return e.onOptionsChange(t)}),n.notEmpty("merge").subscribe(function(t){return e.setOption(t)}),n.has("loading").subscribe(function(t){return e.toggleLoading(!!t)})},t.prototype.ngOnDestroy=function(){this._chart&&(this._chart.dispose(),this._chart=null)},t.prototype.onOptionsChange=function(t){t&&(this._chart||(this._chart=this.createChart(),this.chartInit.emit(this._chart),this.registerEvents(this._chart)),this._chart.setOption(this.options,!0),this._chart.resize())},t.prototype.registerEvents=function(t){var e=this;t&&(t.on("click",function(t){return e._ngZone.run(function(){return e.chartClick.emit(t)})}),t.on("dblClick",function(t){return e._ngZone.run(function(){return e.chartDblClick.emit(t)})}),t.on("mousedown",function(t){return e._ngZone.run(function(){return e.chartMouseDown.emit(t)})}),t.on("mouseup",function(t){return e._ngZone.run(function(){return e.chartMouseUp.emit(t)})}),t.on("mouseover",function(t){return e._ngZone.run(function(){return e.chartMouseOver.emit(t)})}),t.on("mouseout",function(t){return e._ngZone.run(function(){return e.chartMouseOut.emit(t)})}),t.on("globalout",function(t){return e._ngZone.run(function(){return e.chartGlobalOut.emit(t)})}),t.on("contextmenu",function(t){return e._ngZone.run(function(){return e.chartContextMenu.emit(t)})}),t.on("datazoom",function(t){return e._ngZone.run(function(){return e.chartDataZoom.emit(t)})}))},t.prototype.clear=function(){this._chart&&this._chart.clear()},t.prototype.toggleLoading=function(t){this._chart&&(t?this._chart.showLoading(this.loadingType,this.loadingOpts):this._chart.hideLoading())},t.prototype.setOption=function(t,e){this._chart&&this._chart.setOption(t,e)},t}();o.decorators=[{type:e.Directive,args:[{selector:"echarts, [echarts]"}]}],o.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone}]},o.propDecorators={options:[{type:e.Input}],theme:[{type:e.Input}],loading:[{type:e.Input}],initOpts:[{type:e.Input}],merge:[{type:e.Input}],autoResize:[{type:e.Input}],loadingType:[{type:e.Input}],loadingOpts:[{type:e.Input}],chartInit:[{type:e.Output}],chartClick:[{type:e.Output}],chartDblClick:[{type:e.Output}],chartMouseDown:[{type:e.Output}],chartMouseUp:[{type:e.Output}],chartMouseOver:[{type:e.Output}],chartMouseOut:[{type:e.Output}],chartGlobalOut:[{type:e.Output}],chartContextMenu:[{type:e.Output}],chartDataZoom:[{type:e.Output}],onWindowResize:[{type:e.HostListener,args:["window:resize",["$event"]]}]};var i=function(){function t(){}return Object.defineProperty(t.prototype,"echarts",{get:function(){return echarts},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphic",{get:function(){return this._checkEcharts()?echarts.graphic:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"init",{get:function(){return this._checkEcharts()?echarts.init:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"connect",{get:function(){return this._checkEcharts()?echarts.connect:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disconnect",{get:function(){return this._checkEcharts()?echarts.disconnect:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dispose",{get:function(){return this._checkEcharts()?echarts.dispose:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getInstanceByDom",{get:function(){return this._checkEcharts()?echarts.getInstanceByDom:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"registerMap",{get:function(){return this._checkEcharts()?echarts.registerMap:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getMap",{get:function(){return this._checkEcharts()?echarts.getMap:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"registerTheme",{get:function(){return this._checkEcharts()?echarts.registerTheme:undefined},enumerable:!0,configurable:!0}),t.prototype._checkEcharts=function(){return!!echarts||(console.error("[ngx-echarts] global ECharts not loaded"),!1)},t}();i.decorators=[{type:e.Injectable}],i.ctorParameters=function(){return[]};var u=function(){return function(){}}();u.decorators=[{type:e.NgModule,args:[{declarations:[o],exports:[o],providers:[i]}]}],u.ctorParameters=function(){return[]},t.NgxEchartsModule=u,t.NgxEchartsDirective=o,t.NgxEchartsService=i,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ngx-echarts.umd.min.js.map |
@@ -11,2 +11,4 @@ import { ElementRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges, NgZone } from '@angular/core'; | ||
autoResize: boolean; | ||
loadingType: string; | ||
loadingOpts: any; | ||
chartInit: EventEmitter<any>; | ||
@@ -13,0 +15,0 @@ chartClick: EventEmitter<any>; |
@@ -56,2 +56,3 @@ import { Directive, ElementRef, EventEmitter, HostListener, Injectable, Input, NgModule, NgZone, Output } from '@angular/core'; | ||
this.autoResize = true; | ||
this.loadingType = 'default'; | ||
// chart events: | ||
@@ -80,3 +81,4 @@ this.chartInit = new EventEmitter(); | ||
var /** @type {?} */ prop = window.getComputedStyle(dom, null).getPropertyValue('height'); | ||
if (!prop || prop === '0px') { | ||
if ((!prop || prop === '0px') && | ||
(!dom.style.height || dom.style.height === '0px')) { | ||
dom.style.height = '400px'; | ||
@@ -170,3 +172,3 @@ } | ||
if (this._chart) { | ||
loading ? this._chart.showLoading() : this._chart.hideLoading(); | ||
loading ? this._chart.showLoading(this.loadingType, this.loadingOpts) : this._chart.hideLoading(); | ||
} | ||
@@ -205,2 +207,4 @@ }; | ||
'autoResize': [{ type: Input },], | ||
'loadingType': [{ type: Input },], | ||
'loadingOpts': [{ type: Input },], | ||
'chartInit': [{ type: Output },], | ||
@@ -207,0 +211,0 @@ 'chartClick': [{ type: Output },], |
@@ -57,2 +57,3 @@ import { Directive, ElementRef, EventEmitter, HostListener, Injectable, Input, NgModule, NgZone, Output } from '@angular/core'; | ||
this.autoResize = true; | ||
this.loadingType = 'default'; | ||
// chart events: | ||
@@ -80,3 +81,4 @@ this.chartInit = new EventEmitter(); | ||
let /** @type {?} */ prop = window.getComputedStyle(dom, null).getPropertyValue('height'); | ||
if (!prop || prop === '0px') { | ||
if ((!prop || prop === '0px') && | ||
(!dom.style.height || dom.style.height === '0px')) { | ||
dom.style.height = '400px'; | ||
@@ -168,3 +170,3 @@ } | ||
if (this._chart) { | ||
loading ? this._chart.showLoading() : this._chart.hideLoading(); | ||
loading ? this._chart.showLoading(this.loadingType, this.loadingOpts) : this._chart.hideLoading(); | ||
} | ||
@@ -202,2 +204,4 @@ } | ||
'autoResize': [{ type: Input },], | ||
'loadingType': [{ type: Input },], | ||
'loadingOpts': [{ type: Input },], | ||
'chartInit': [{ type: Output },], | ||
@@ -204,0 +208,0 @@ 'chartClick': [{ type: Output },], |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":3,"metadata":{"NgxEchartsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[{"__symbolic":"reference","name":"NgxEchartsDirective"}],"exports":[{"__symbolic":"reference","name":"NgxEchartsDirective"}],"providers":[{"__symbolic":"reference","name":"NgxEchartsService"}]}]}],"members":{}},"NgxEchartsDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"echarts, [echarts]"}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"theme":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"loading":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"initOpts":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"merge":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"autoResize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"chartInit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartClick":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartDblClick":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartMouseDown":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartMouseUp":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartMouseOver":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartMouseOut":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartGlobalOut":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartContextMenu":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartDataZoom":[{"__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":"@angular/core","name":"NgZone"}]}],"createChart":[{"__symbolic":"method"}],"onWindowResize":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["window:resize",["$event"]]}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onOptionsChange":[{"__symbolic":"method"}],"registerEvents":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"toggleLoading":[{"__symbolic":"method"}],"setOption":[{"__symbolic":"method"}]}},"NgxEchartsService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"_checkEcharts":[{"__symbolic":"method"}]}}},"origins":{"NgxEchartsModule":"./ngx-echarts.module","NgxEchartsDirective":"./directive/ngx-echarts.directive","NgxEchartsService":"./service/ngx-echarts.service"},"importAs":"ngx-echarts"} | ||
{"__symbolic":"module","version":3,"metadata":{"NgxEchartsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[{"__symbolic":"reference","name":"NgxEchartsDirective"}],"exports":[{"__symbolic":"reference","name":"NgxEchartsDirective"}],"providers":[{"__symbolic":"reference","name":"NgxEchartsService"}]}]}],"members":{}},"NgxEchartsDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"echarts, [echarts]"}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"theme":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"loading":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"initOpts":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"merge":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"autoResize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"loadingType":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"loadingOpts":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"chartInit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartClick":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartDblClick":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartMouseDown":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartMouseUp":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartMouseOver":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartMouseOut":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartGlobalOut":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartContextMenu":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"chartDataZoom":[{"__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":"@angular/core","name":"NgZone"}]}],"createChart":[{"__symbolic":"method"}],"onWindowResize":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["window:resize",["$event"]]}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onOptionsChange":[{"__symbolic":"method"}],"registerEvents":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"toggleLoading":[{"__symbolic":"method"}],"setOption":[{"__symbolic":"method"}]}},"NgxEchartsService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"_checkEcharts":[{"__symbolic":"method"}]}}},"origins":{"NgxEchartsModule":"./ngx-echarts.module","NgxEchartsDirective":"./directive/ngx-echarts.directive","NgxEchartsService":"./service/ngx-echarts.service"},"importAs":"ngx-echarts"} |
@@ -1,1 +0,1 @@ | ||
{"name":"ngx-echarts","version":"2.0.2","description":"Angular directive for ECharts 3","repository":"https://github.com/xieziyu/ngx-echarts.git","author":"Xie, Ziyu <ziyu.xie@foxmail.com>","bugs":{"url":"https://github.com/xieziyu/ngx-echarts/issues","email":"xieziyu@foxmail.com"},"homepage":"https://github.com/xieziyu/ngx-echarts#readme","keywords":["angular","2","4","5","echarts","ng","ngx","ng2"],"peerDependencies":{"@angular/common":">=2.3.0","@angular/compiler":">=2.3.0","@angular/core":">=2.3.0","echarts":">=3.1.1"},"main":"bundles/ngx-echarts.umd.js","module":"ngx-echarts.es5.js","es2015":"ngx-echarts.js","typings":"ngx-echarts.d.ts","metadata":"ngx-echarts.metadata.json"} | ||
{"name":"ngx-echarts","version":"2.1.0","description":"Angular directive for ECharts 3","repository":"https://github.com/xieziyu/ngx-echarts.git","author":"Xie, Ziyu <ziyu.xie@foxmail.com>","bugs":{"url":"https://github.com/xieziyu/ngx-echarts/issues","email":"xieziyu@foxmail.com"},"homepage":"https://github.com/xieziyu/ngx-echarts#readme","keywords":["angular","2","4","5","echarts","ng","ngx","ng2"],"peerDependencies":{"@angular/common":">=2.3.0","@angular/compiler":">=2.3.0","@angular/core":">=2.3.0","echarts":">=3.1.1"},"main":"bundles/ngx-echarts.umd.js","module":"ngx-echarts.es5.js","es2015":"ngx-echarts.js","typings":"ngx-echarts.d.ts","metadata":"ngx-echarts.metadata.json"} |
@@ -24,2 +24,6 @@ # ngx-echarts | ||
# Latest Update | ||
+ 2018.03.14: v2.1.0 | ||
+ New: `[loadingOpts]` to customize loading style. Refer to [API](#api) | ||
+ Bugfix: double check `dom.style.height` before setting default value. | ||
+ 2018.02.07: v2.0.2. New: `[autoResize]` input (default: true). [PR #73](https://github.com/xieziyu/ngx-echarts/pull/73) by [arethore-actility](https://github.com/arethore-actility) | ||
@@ -238,2 +242,14 @@ | ||
+ `[loadingOpts]`: Input an object to customize loading style. Refer to [ECharts documentation](https://ecomfe.github.io/echarts-doc/public/en/api.html#echartsInstance.showLoading) for details. By default: | ||
```javascript | ||
{ | ||
text: 'loading', | ||
color: '#c23531', | ||
textColor: '#000', | ||
maskColor: 'rgba(255, 255, 255, 0.8)', | ||
zlevel: 0 | ||
} | ||
``` | ||
It exposes the `echartsInstance` (since v1.1.6) in `(chartInit)` event. So you can directly call the APIs just like: `resize()`, `showLoading()`, etc. For example: | ||
@@ -240,0 +256,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147278
1293
329