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

ngx-echarts

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-echarts - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

44

bundles/ngx-echarts.umd.js

@@ -10,3 +10,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

root["ngx-echarts.umd"] = factory(root["@angular/core"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {
})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) {
return /******/ (function(modules) { // webpackBootstrap

@@ -82,6 +82,12 @@ /******/ // The module cache

/* 0 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_0__;
/***/ }),
/* 1 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__angular_core__);

@@ -99,2 +105,3 @@ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AngularEchartsDirective; });

var AngularEchartsDirective = (function () {

@@ -205,7 +212,24 @@ function AngularEchartsDirective(el, renderer, _ngZone) {

AngularEchartsDirective.prototype.hasData = function () {
if (this.options.baseOption && this.options.baseOption.timeline) {
var options = this.options.options;
if (options.length) {
for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
var o = options_1[_i];
if (o.series) {
for (var _a = 0, _b = o.series; _a < _b.length; _a++) {
var serie = _b[_a];
if (serie.data && serie.data.length > 0) {
return true;
}
}
}
}
}
return false;
}
if (!this.options.series || !this.options.series.length) {
return false;
}
for (var _i = 0, _a = this.options.series; _i < _a.length; _i++) {
var serie = _a[_i];
for (var _c = 0, _d = this.options.series; _c < _d.length; _c++) {
var serie = _d[_c];
if (serie.data && serie.data.length > 0) {

@@ -243,3 +267,3 @@ return true;

__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
__metadata("design:type", String)
__metadata("design:type", Object)
], AngularEchartsDirective.prototype, "theme", void 0);

@@ -306,8 +330,2 @@ __decorate([

/***/ }),
/* 1 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_1__;
/***/ }),
/* 2 */

@@ -318,5 +336,5 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) {

Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__angular_core__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__directive_angular_echarts_directive__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__directive_angular_echarts_directive__ = __webpack_require__(1);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "AngularEchartsDirective", function() { return __WEBPACK_IMPORTED_MODULE_1__directive_angular_echarts_directive__["a"]; });

@@ -323,0 +341,0 @@ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AngularEchartsModule", function() { return AngularEchartsModule; });

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

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@angular/core")):"function"==typeof define&&define.amd?define(["@angular/core"],e):"object"==typeof exports?exports["ngx-echarts.umd.min"]=e(require("@angular/core")):t["ngx-echarts.umd.min"]=e(t["@angular/core"])}(this,function(t){return function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=2)}([function(t,e,n){"use strict";var i=n(1);n.n(i);n.d(e,"a",function(){return s});var o=this&&this.__decorate||function(t,e,n,i){var o,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,n,s):o(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=function(){function t(t,e,n){this.el=t,this.renderer=e,this._ngZone=n,this.theme="",this.chartInit=new i.EventEmitter,this.chartClick=new i.EventEmitter,this.chartDblClick=new i.EventEmitter,this.chartMouseDown=new i.EventEmitter,this.chartMouseUp=new i.EventEmitter,this.chartMouseOver=new i.EventEmitter,this.chartMouseOut=new i.EventEmitter,this.chartGlobalOut=new i.EventEmitter,this.chartContextMenu=new i.EventEmitter,this.chartDataZoom=new i.EventEmitter,this.myChart=null,this.currentWindowWidth=null}return t.prototype.createChart=function(){var t=this;return this.theme=this.theme||"",this.currentWindowWidth=window.innerWidth,this.theme?this._ngZone.runOutsideAngular(function(){return echarts.init(t.el.nativeElement,t.theme)}):this._ngZone.runOutsideAngular(function(){return echarts.init(t.el.nativeElement)})},t.prototype.updateChart=function(){this.myChart.setOption(this.options),this.myChart.resize()},t.prototype.onWindowResize=function(t){t.target.innerWidth!==this.currentWindowWidth&&(this.currentWindowWidth=t.target.innerWidth,this.myChart&&this.myChart.resize())},t.prototype.ngOnChanges=function(t){t.dataset&&this.onDatasetChange(this.dataset),t.options&&this.onOptionsChange(this.options),t.loading&&this.onLoadingChange(this.loading)},t.prototype.ngOnDestroy=function(){this.myChart&&(this.myChart.dispose(),this.myChart=null)},t.prototype.onOptionsChange=function(t){t&&(this.myChart||(this.myChart=this.createChart(),this.chartInit.emit(this.myChart),this.registerEvents(this.myChart)),this.hasData()?this.updateChart():this.dataset&&this.dataset.length&&(this.mergeDataset(this.dataset),this.updateChart()))},t.prototype.onDatasetChange=function(t){this.myChart&&this.options&&(this.options.series||(this.options.series=[]),this.mergeDataset(t),this.updateChart())},t.prototype.onLoadingChange=function(t){this.myChart&&(t?this.myChart.showLoading():this.myChart.hideLoading())},t.prototype.mergeDataset=function(t){for(var e=0,n=t.length;e<n;e++)this.options.series[e]?this.options.series[e].data=t[e]:this.options.series[e]={data:t[e]}},t.prototype.hasData=function(){if(!this.options.series||!this.options.series.length)return!1;for(var t=0,e=this.options.series;t<e.length;t++){var n=e[t];if(n.data&&n.data.length>0)return!0}return!1},t.prototype.registerEvents=function(t){var e=this;t&&(t.on("click",function(t){e.chartClick.emit(t)}),t.on("dblClick",function(t){e.chartDblClick.emit(t)}),t.on("mousedown",function(t){e.chartMouseDown.emit(t)}),t.on("mouseup",function(t){e.chartMouseUp.emit(t)}),t.on("mouseover",function(t){e.chartMouseOver.emit(t)}),t.on("mouseout",function(t){e.chartMouseOut.emit(t)}),t.on("globalout",function(t){e.chartGlobalOut.emit(t)}),t.on("contextmenu",function(t){e.chartContextMenu.emit(t)}),t.on("dataZoom",function(t){e.chartDataZoom.emit(t)}))},t}();o([n.i(i.Input)(),r("design:type",Object)],s.prototype,"options",void 0),o([n.i(i.Input)(),r("design:type",Array)],s.prototype,"dataset",void 0),o([n.i(i.Input)(),r("design:type",String)],s.prototype,"theme",void 0),o([n.i(i.Input)(),r("design:type",Boolean)],s.prototype,"loading",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartInit",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartClick",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartDblClick",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartMouseDown",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartMouseUp",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartMouseOver",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartMouseOut",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartGlobalOut",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartContextMenu",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartDataZoom",void 0),o([n.i(i.HostListener)("window:resize",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],s.prototype,"onWindowResize",null),s=o([n.i(i.Directive)({selector:"[echarts]"}),r("design:paramtypes",[i.ElementRef,i.Renderer,i.NgZone])],s)},function(e,n){e.exports=t},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=(n.n(i),n(0));n.d(e,"AngularEchartsDirective",function(){return o.a}),n.d(e,"AngularEchartsModule",function(){return s});var r=this&&this.__decorate||function(t,e,n,i){var o,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,n,s):o(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s},s=function(){function t(){}return t}();s=r([n.i(i.NgModule)({declarations:[o.a],exports:[o.a]})],s)}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@angular/core")):"function"==typeof define&&define.amd?define(["@angular/core"],e):"object"==typeof exports?exports["ngx-echarts.umd.min"]=e(require("@angular/core")):t["ngx-echarts.umd.min"]=e(t["@angular/core"])}(this,function(t){return function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=2)}([function(e,n){e.exports=t},function(t,e,n){"use strict";var i=n(0);n.n(i);n.d(e,"a",function(){return s});var o=this&&this.__decorate||function(t,e,n,i){var o,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,n,s):o(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=function(){function t(t,e,n){this.el=t,this.renderer=e,this._ngZone=n,this.theme="",this.chartInit=new i.EventEmitter,this.chartClick=new i.EventEmitter,this.chartDblClick=new i.EventEmitter,this.chartMouseDown=new i.EventEmitter,this.chartMouseUp=new i.EventEmitter,this.chartMouseOver=new i.EventEmitter,this.chartMouseOut=new i.EventEmitter,this.chartGlobalOut=new i.EventEmitter,this.chartContextMenu=new i.EventEmitter,this.chartDataZoom=new i.EventEmitter,this.myChart=null,this.currentWindowWidth=null}return t.prototype.createChart=function(){var t=this;return this.theme=this.theme||"",this.currentWindowWidth=window.innerWidth,this.theme?this._ngZone.runOutsideAngular(function(){return echarts.init(t.el.nativeElement,t.theme)}):this._ngZone.runOutsideAngular(function(){return echarts.init(t.el.nativeElement)})},t.prototype.updateChart=function(){this.myChart.setOption(this.options),this.myChart.resize()},t.prototype.onWindowResize=function(t){t.target.innerWidth!==this.currentWindowWidth&&(this.currentWindowWidth=t.target.innerWidth,this.myChart&&this.myChart.resize())},t.prototype.ngOnChanges=function(t){t.dataset&&this.onDatasetChange(this.dataset),t.options&&this.onOptionsChange(this.options),t.loading&&this.onLoadingChange(this.loading)},t.prototype.ngOnDestroy=function(){this.myChart&&(this.myChart.dispose(),this.myChart=null)},t.prototype.onOptionsChange=function(t){t&&(this.myChart||(this.myChart=this.createChart(),this.chartInit.emit(this.myChart),this.registerEvents(this.myChart)),this.hasData()?this.updateChart():this.dataset&&this.dataset.length&&(this.mergeDataset(this.dataset),this.updateChart()))},t.prototype.onDatasetChange=function(t){this.myChart&&this.options&&(this.options.series||(this.options.series=[]),this.mergeDataset(t),this.updateChart())},t.prototype.onLoadingChange=function(t){this.myChart&&(t?this.myChart.showLoading():this.myChart.hideLoading())},t.prototype.mergeDataset=function(t){for(var e=0,n=t.length;e<n;e++)this.options.series[e]?this.options.series[e].data=t[e]:this.options.series[e]={data:t[e]}},t.prototype.hasData=function(){if(this.options.baseOption&&this.options.baseOption.timeline){var t=this.options.options;if(t.length)for(var e=0,n=t;e<n.length;e++){var i=n[e];if(i.series)for(var o=0,r=i.series;o<r.length;o++){var s=r[o];if(s.data&&s.data.length>0)return!0}}return!1}if(!this.options.series||!this.options.series.length)return!1;for(var a=0,h=this.options.series;a<h.length;a++){var s=h[a];if(s.data&&s.data.length>0)return!0}return!1},t.prototype.registerEvents=function(t){var e=this;t&&(t.on("click",function(t){e.chartClick.emit(t)}),t.on("dblClick",function(t){e.chartDblClick.emit(t)}),t.on("mousedown",function(t){e.chartMouseDown.emit(t)}),t.on("mouseup",function(t){e.chartMouseUp.emit(t)}),t.on("mouseover",function(t){e.chartMouseOver.emit(t)}),t.on("mouseout",function(t){e.chartMouseOut.emit(t)}),t.on("globalout",function(t){e.chartGlobalOut.emit(t)}),t.on("contextmenu",function(t){e.chartContextMenu.emit(t)}),t.on("dataZoom",function(t){e.chartDataZoom.emit(t)}))},t}();o([n.i(i.Input)(),r("design:type",Object)],s.prototype,"options",void 0),o([n.i(i.Input)(),r("design:type",Array)],s.prototype,"dataset",void 0),o([n.i(i.Input)(),r("design:type",Object)],s.prototype,"theme",void 0),o([n.i(i.Input)(),r("design:type",Boolean)],s.prototype,"loading",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartInit",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartClick",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartDblClick",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartMouseDown",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartMouseUp",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartMouseOver",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartMouseOut",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartGlobalOut",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartContextMenu",void 0),o([n.i(i.Output)(),r("design:type",i.EventEmitter)],s.prototype,"chartDataZoom",void 0),o([n.i(i.HostListener)("window:resize",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],s.prototype,"onWindowResize",null),s=o([n.i(i.Directive)({selector:"[echarts]"}),r("design:paramtypes",[i.ElementRef,i.Renderer,i.NgZone])],s)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=(n.n(i),n(1));n.d(e,"AngularEchartsDirective",function(){return o.a}),n.d(e,"AngularEchartsModule",function(){return s});var r=this&&this.__decorate||function(t,e,n,i){var o,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,n,s):o(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s},s=function(){function t(){}return t}();s=r([n.i(i.NgModule)({declarations:[o.a],exports:[o.a]})],s)}])});

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

<a name="1.2.4"></a>
## [1.2.4](https://github.com/xieziyu/ngx-echarts/compare/v1.2.3...v1.2.4) (2017-08-22)
### Bugfix
+ Support chart with `timeline` options.
<a name="1.2.3"></a>

@@ -2,0 +8,0 @@ ## [1.2.3](https://github.com/xieziyu/ngx-echarts/compare/v1.2.2...v1.2.3) (2017-07-21)

@@ -1,2 +0,3 @@

import { ElementRef, Renderer, OnChanges, OnDestroy, SimpleChange, EventEmitter, NgZone } from '@angular/core';
import { ElementRef, Renderer, EventEmitter } from '@angular/core';
import { OnChanges, OnDestroy, SimpleChange, NgZone } from '@angular/core';
export declare class AngularEchartsDirective implements OnChanges, OnDestroy {

@@ -3,0 +4,0 @@ private el;

@@ -1,2 +0,3 @@

import { Directive, ElementRef, Renderer, Input, Output, HostListener, EventEmitter, NgZone } from '@angular/core';
import { Directive, ElementRef, Renderer, Input, Output, HostListener, EventEmitter } from '@angular/core';
import { NgZone } from '@angular/core';
var AngularEchartsDirective = (function () {

@@ -107,7 +108,24 @@ function AngularEchartsDirective(el, renderer, _ngZone) {

AngularEchartsDirective.prototype.hasData = function () {
if (this.options.baseOption && this.options.baseOption.timeline) {
var options = this.options.options;
if (options.length) {
for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
var o = options_1[_i];
if (o.series) {
for (var _a = 0, _b = o.series; _a < _b.length; _a++) {
var serie = _b[_a];
if (serie.data && serie.data.length > 0) {
return true;
}
}
}
}
}
return false;
}
if (!this.options.series || !this.options.series.length) {
return false;
}
for (var _i = 0, _a = this.options.series; _i < _a.length; _i++) {
var serie = _a[_i];
for (var _c = 0, _d = this.options.series; _c < _d.length; _c++) {
var serie = _d[_c];
if (serie.data && serie.data.length > 0) {

@@ -114,0 +132,0 @@ return true;

{
"main": "bundles/ngx-echarts.umd.js",
"version": "1.2.3",
"version": "1.2.4",
"description": "Angular directive for ECharts v3.",

@@ -30,5 +30,5 @@ "module": "index.js",

},
"_id": "ngx-echarts@1.2.3",
"_id": "ngx-echarts@1.2.4",
"devDependencies": {},
"dependencies": {}
}

@@ -17,2 +17,4 @@ # ngx-echarts [![npm version](https://badge.fury.io/js/ngx-echarts.svg)](http://badge.fury.io/js/ngx-echarts) [![npm downloads](https://img.shields.io/npm/dm/ngx-echarts.svg)](https://npmjs.org/ngx-echarts)

# Latest Update
+ 2017.08.22: Bugfix: support chart with `timeline` options.
+ 2017.07.21: Reduced CPU usage. ([PR #16](https://github.com/xieziyu/ngx-echarts/pull/16) by [RozennK](https://github.com/RozennK))

@@ -19,0 +21,0 @@

Sorry, the diff of this file is not supported yet

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