Ngx-charts: Angular 6 support

Created on 6 Apr 2018  路  5Comments  路  Source: swimlane/ngx-charts

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here

Opening up the ticket since i didnt see it anywhere just as a placeholder 馃槃

Current behavior

Since angular 6 started using rxjs 6.. there are some breaking changes on how to import Observables and what not.

e.g.
Before:

import { Observable } from 'rxjs/Observable'; 

After:

import { Observable } from `rxjs`; 

Expected behavior

Should work with angular 6, since this is a show stopper when upgrading.
Thanks in advance!

  • Angular version: 6.0.0 (rxjs 6.0.0)
Accept PRs Backlog High

Most helpful comment

They work w/ NG6, u just needd to run compat.

All 5 comments

They work w/ NG6, u just needd to run compat.

Yeah, that's my workaround but i was trying to avoid adding that extra dependency going forward.

I imagine you will have it around for awhile w/ other projects still leaning on old apis.

@amcdnl do you know when you'd want to land rxjs 6? I believe the change is simple and compatible with rxjs@forward-compat for those who don't want to jump to v6 (see migrate guide).

```patch
diff --git a/src/common/base-chart.component.ts b/src/common/base-chart.component.ts
index 9f866d44..f197de31 100644
--- a/src/common/base-chart.component.ts
+++ b/src/common/base-chart.component.ts
@@ -3,8 +3,8 @@ import {
Output, EventEmitter, AfterViewInit, OnDestroy, OnChanges, SimpleChanges
} from '@angular/core';

-import { fromEvent as observableFromEvent } from 'rxjs/observable/fromEvent';
-import { debounceTime } from 'rxjs/operators/debounceTime';
+import { fromEvent as observableFromEvent } from 'rxjs';
+import { debounceTime } from 'rxjs/operators';

import { VisibilityObserver } from '../utils';
```

Released in 8.0.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jacquers picture Jacquers  路  3Comments

merinshaji picture merinshaji  路  3Comments

tobigit picture tobigit  路  4Comments

workfel picture workfel  路  3Comments

DZDomi picture DZDomi  路  4Comments