diff --git a/README.md b/README.md index bb0b307..60f6642 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,11 @@ Provides a `PlotlyComponent` for working with [Plotly.js](https://plot.ly/javascript/) This library is designed around the `Plotly.react()` API (available since Plotly.js 1.34.0) -There is an official [angular-plotly.js](https://github.com/plotly/angular-plotly.js) library. However, there are some design differences, which are discussed at the bottom of this page. +There is an official [angular-plotly.js](https://github.com/plotly/angular-plotly.js) library. However, **angular-plotly-react** has a different design, which is discussed at the bottom of this page. + +# Project Status + +I am no longer working on this project or maintaining it in any way. Feel free to fork it or take whatever code is useful. If you are interested in maintaining the project and want me to transfer it to you, let me know. ## angular-plotly-react installation @@ -112,18 +116,20 @@ import: [ ``` ## angular-plotly.js discussion -There is an official [angular-plotly.js](https://github.com/plotly/angular-plotly.js) library. - -However, I decided to publish **angular-plotly-react** because of some fundamental design differences: +There is an official [angular-plotly.js](https://github.com/plotly/angular-plotly.js) library. However, I decided to publish **angular-plotly-react** because of some fundamental design differences. +For comparison, see: + * [angular-plotly.js PlotlyComponent](https://github.com/plotly/angular-plotly.js/blob/master/src/app/plotly/plot/plot.component.ts) + * [angular-plotly-react PlotlyComponent](https://github.com/arlowhite/angular-plotly-react/blob/master/projects/angular-plotly-react/src/lib/plotly.component.ts) +**Summary:** * **angular-plotly.js** requires that you install plotly.js and provides no way to choose the build (see issue [#5](https://github.com/plotly/angular-plotly.js/issues/5)) `import * as Plotlyjs from 'plotly.js/dist/plotly.js';` -**angular-plotly-react** just uses the `Plotly` global, so you can load plotly.js from a CDN or load it yourself. +**angular-plotly-react** just uses the `Plotly` global by default and supports multiple ways of loading plotly.js. * **angular-plotly.js** has some [strange change detection code](https://github.com/plotly/angular-plotly.js/blob/156ff58ef187267d2c441f7842e572510b06653a/src/app/plotly/plot/plot.component.ts#L234), which I worry will impact performance when plotting lots of data. _I plan to test this and report the issue._ * **angular-plotly.js** creates an `Output() EventEmitter` for every Plotly event (about 26) and hooks all of them even if you don't use the event. - * Currently, **angular-plotly-react** manages `datarevision` for you. + * Currently, **angular-plotly-react** manages `datarevision` for you and increments it when data changes, which simplifies usage. * **angular-plotly-react** currently lacks a few features such as `[divId]`, `[style]`, `[className]`, `[debug]`, but IMO these aren't needed. Submit an issue if you think otherwise. - * `(error)` Plotly.react() does not seem to throw errors, so **angular-plotly-react** has no error reporting system. + * `(error)` Plotly.react() does not seem to throw errors (at least with bad trace data), so **angular-plotly-react** has no error reporting system. _needs more research_ # Development diff --git a/package-lock.json b/package-lock.json index 95c2c55..0592fa0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "angular-plotly", - "version": "0.1.1", + "version": "0.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ec9c628..0c7c0c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-plotly", - "version": "0.2.0", + "version": "0.2.1", "scripts": { "ng": "ng", "start": "ng serve", @@ -11,11 +11,11 @@ }, "private": true, "dependencies": { - "@angular/animations": "^6.0.2", - "@angular/cdk": "^6.0.2", "@angular/common": "^6.0.2", - "@angular/compiler": "^6.0.2", "@angular/core": "^6.0.2", + "@angular/compiler": "^6.0.2", + "@angular/animations": "^6.0.2", + "@angular/cdk": "^6.0.2", "@angular/forms": "^6.0.2", "@angular/http": "^6.0.2", "@angular/material": "^6.0.2", @@ -29,10 +29,14 @@ "zone.js": "^0.8.26" }, "devDependencies": { - "@angular-devkit/build-angular": "~0.6.3", + "@angular/compiler-cli": "^6.0.2", "@angular-devkit/build-ng-packagr": "~0.6.3", + "@angular-devkit/build-angular": "~0.6.3", + "ng-packagr": "^3.0.0-rc.2", + "tsickle": ">=0.25.5", + "tslib": "^1.7.1", + "typescript": "~2.7.2", "@angular/cli": "~6.0.3", - "@angular/compiler-cli": "^6.0.2", "@angular/language-service": "^6.0.2", "@types/jasmine": "~2.8.6", "@types/jasminewd2": "~2.0.3", @@ -46,12 +50,8 @@ "karma-coverage-istanbul-reporter": "~1.4.2", "karma-jasmine": "~1.1.1", "karma-jasmine-html-reporter": "^0.2.2", - "ng-packagr": "^3.0.0-rc.2", "protractor": "~5.3.0", "ts-node": "~5.0.1", - "tsickle": ">=0.25.5", - "tslib": "^1.7.1", - "tslint": "~5.9.1", - "typescript": "~2.7.2" + "tslint": "~5.9.1" } } diff --git a/projects/angular-plotly-react/package-lock.json b/projects/angular-plotly-react/package-lock.json index 2e020bf..98789db 100644 --- a/projects/angular-plotly-react/package-lock.json +++ b/projects/angular-plotly-react/package-lock.json @@ -1,6 +1,6 @@ { "name": "angular-plotly-react", - "version": "0.1.0", + "version": "0.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/projects/angular-plotly-react/package.json b/projects/angular-plotly-react/package.json index 179e5e7..c7f821d 100644 --- a/projects/angular-plotly-react/package.json +++ b/projects/angular-plotly-react/package.json @@ -7,7 +7,7 @@ "plotly.js", "graph" ], - "version": "0.2.0", + "version": "0.2.1", "license": "MIT", "homepage": "https://github.com/arlowhite/angular-plotly-react", "bugs": "https://github.com/arlowhite/angular-plotly-react/issues", @@ -16,8 +16,8 @@ "url": "https://github.com/arlowhite/angular-plotly-react.git" }, "peerDependencies": { - "@angular/common": "^4.0.0", - "@angular/core": "^4.0.0" + "@angular/common": "^6.0.0-rc.0 || ^6.0.0 || ^5.0.0 || ^4.0.0", + "@angular/core": "^6.0.0-rc.0 || ^6.0.0 || ^5.0.0 || ^4.0.0" }, "devDependencies": { "@types/plotly.js": "^1.36.1"