fusioncharts / angular4-fusioncharts

A simple and lightweight Angular 4 component which provides bindings for FusionCharts JavaScript Charting Library
MIT License
17 stars 7 forks source link

angular 6 compat? #15

Open tosehee75 opened 6 years ago

tosehee75 commented 6 years ago

Any plan for this????????????????????

SpiderPork commented 6 years ago

Please fix Angular 6 compatibility!

jhlee1025 commented 6 years ago

Please support Angular 6 ASAP !!!

rousan commented 6 years ago

Hello @tosehee75, @SpiderPork, @jhlee1025,

The existing angular4-fusioncharts wrapper is compatible with Angular 6. Let us know if you face any problems.

torresdaniel11 commented 6 years ago

Hello @rousan i still having this message when i try to upgrade mi angular version to the latest

Package "angular4-fusioncharts" has an incompatible peer dependency to "@angular/core" (requires ">=5.0.0-rc.0 <6.0.0||>=4.2.4 <5.0.0", would install "6.0.7").

i already delete and reinstall "fusioncharts": "^3.12.2", and "angular4-fusioncharts": "^1.0.0"

any idea on how to upgrade?

SpiderPork commented 6 years ago

I have the same problem, with the same error message.

rousan commented 6 years ago

Hey @torresdaniel11, can you show us the exact messages printed in the console?

balaji142857 commented 6 years ago

hello @rousan , Below is the warning I get when using angular4-fusioncharts with angular6 (it gets installed and entry is added in package.json file), but unable to use due to errors at runtime

npm install angular4-fusioncharts --save
npm WARN codelyzer@3.2.2 requires a peer of @angular/compiler@^2.3.1 || >=4.0.0-beta <5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN codelyzer@3.2.2 requires a peer of @angular/core@^2.3.1 || >=4.0.0-beta <5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular4-fusioncharts@1.0.0 requires a peer of @angular/core@^4.2.4 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ angular4-fusioncharts@1.0.0
added 1 package from 3 contributors and audited 21778 packages in 11.036s

Getting the below error in browser at runtime:

ERROR TypeError: core is not a function
    at Function.push../node_modules/angular4-fusioncharts/dist/src/fusioncharts/fusioncharts.service.js.FusionChartsService.resolveFusionChartsCore (fusioncharts.service.js:23)
    at new FusionChartsService (fusioncharts.service.js:7)
    at _createClass (core.js:8206)
    at _createProviderInstance (core.js:8178)
    at resolveNgModuleDep (core.js:8141)
    at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:8849)
    at resolveDep (core.js:9214)
    at createClass (core.js:9088)
    at createDirectiveInstance (core.js:8971)
    at createViewNodes (core.js:10191)

update

tried using fcRoot instead of forRoot, but still getting the same error

rousan commented 6 years ago

@balaji142857, Please avoid the warning appeared during installing the package, And you are facing the error at runtime as you are supposed to use the angular4-fusioncharts module as below in your AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
// Import fusioncharts modules
import * as FusionCharts from 'fusioncharts';
import * as Charts from 'fusioncharts/fusioncharts.charts';
import * as FintTheme from 'fusioncharts/themes/fusioncharts.theme.fint';
import { FusionChartsModule } from 'angular4-fusioncharts';
import { AppComponent } from './app.component';

// Call fcRoot with FusionCharts as first argument
FusionChartsModule.fcRoot(FusionCharts, Charts, FintTheme);

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        FusionChartsModule
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }
balaji142857 commented 6 years ago

@rousan thanks, it worked

nitthi commented 6 years ago

import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import as FusionCharts from 'fusioncharts'; import as Charts from 'fusioncharts/fusioncharts.charts'; import * as FusionTheme from 'fusioncharts/themes/fusioncharts.theme.fusion'; import { FusionChartsModule } from 'angular-fusioncharts'; FusionChartsModule.fcRoot(FusionCharts, Charts, FusionTheme);

import { AppComponent } from './app.component';

@NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, FusionChartsModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }

I got the below error, fusion

Nisha-Yadav-1 commented 6 years ago

I got this error. Please help me out! thanks in advance! 1

rousan commented 6 years ago

@nitthi, The error you are facing is not related to fusioncharts, I think that is happening because of config mismatch in your build system.

rousan commented 6 years ago

@Nisha-Yadav-1 Can you tell me which version of fusioncharts you are using ?

SurajGajbar commented 5 years ago

@nitthi I am also getting same error as @Nisha-Yadav-1. Can you please help. I have attached package.json file. package.txt

torresdaniel11 commented 5 years ago

i have the same error as @Nisha-Yadav-1

i start a new project created with AngularCLI Angular CLI: 6.0.8 Angular: 6.1.7

"angular4-fusioncharts": "^1.0.0",
"fusioncharts": "^3.12.2"

@rousan i follow your example (is working on my angular 4 project) but in this project (V6) i have this error : image

Please, give me a hand on this

Thanks

//-----------------------------------------------------------------------------------------------

i fix it

i found that in my packag-lock.json i had fusioncharts version 3.13.1

i replace

{
"fusioncharts": ...
}

with

  "fusioncharts": {
      "version": "3.12.2",
      "resolved": "https://registry.npmjs.org/fusioncharts/-/fusioncharts-3.12.2.tgz",
      "integrity": "sha512-uCOkD1KN7NbZRS0xsA3BYhxYeOeKab2oWlAN9i60g2Hu+Hap7kphGlS9o6y6YJLHu7494/f4+/Hu5D0VSVmytg=="
    }

then i delete my node_module folder and run

npm install

ng serve

and everything start working again!

ashok1994 commented 5 years ago

@torresdaniel11 please refer the new plugin for fusioncharts, angular-fusioncharts