angular-fusioncharts icon indicating copy to clipboard operation
angular-fusioncharts copied to clipboard

Anuglar 12 support

Open matthewtquinn1 opened this issue 3 years ago • 10 comments

Hi @AyanBhadury,

I read through some of the other issues (open and closed), and found this one in particular that you advise to update angular-fusioncharts to 3.2.0. https://github.com/fusioncharts/angular-fusioncharts/issues/114#issuecomment-914324393

I have now done this, however I am now seeing these warnings:

image

From this I have two questions:

  • When will this repo be updated to support Angular 12?
  • Is there documentation or a readme for which version of angular-fusioncharts AND fusioncharts I should have when running my app on Angular 12?

We were also seeing issues with angular-fusioncharts not accepting certain properties, e.g. the license key that is required when upgrading fusioncharts: (i.e. FusionCharts.options.license). If we upgrade fusioncharts to 3.16 or above, then we still see this issue:

image

Current setup:

  • Angular: 12.2.15
  • angular-fusioncharts: 3.2.0
  • fusioncharts: 3.15.2

Thanks.

matthewtquinn1 avatar Jan 25 '22 12:01 matthewtquinn1

@matthewtquinn1 here is the summary of your issues 1- you can bypass the warnings that will not break your angular app.

2- It seems you are not using fusioncharts 3.15.2 because it's looking for license key which is supported in version 3.15.3 onwards, in the browser console please type FusionCharts.version for version details.

AyanBhadury avatar Jan 25 '22 13:01 AyanBhadury

1 - OK I'll ignore that for now.

2 - If I upgrade to 3.15.3 or higher then I will receive this error.

matthewtquinn1 avatar Jan 25 '22 13:01 matthewtquinn1

Right if you upgrade to 3.15.3 and up you will need licence key to remove the trail mark.

FusionCharts.options['license']({ key: '<YOUR KEY>', creditLabel: false, });

AyanBhadury avatar Jan 25 '22 13:01 AyanBhadury

I have now updated to the version you recommended, and am receiving two different issues:

The FusionCharts.options object does not contain a definition for license.

If I use the example you provided (not using dot notation to set the key), then I see that the chart still has the watermark on it:

image

matthewtquinn1 avatar Jan 25 '22 16:01 matthewtquinn1

It seems you are not using a different fusioncharts version, in the web browser console please type FusionCharts.version for version details.

AyanBhadury avatar Jan 25 '22 16:01 AyanBhadury

Here's a screenshot of the result, as you asked :) As you can see its 3.15.3

image

matthewtquinn1 avatar Jan 26 '22 09:01 matthewtquinn1

Drop a mail to [email protected] with your license key, they would help you accordingly.

AyanBhadury avatar Jan 26 '22 09:01 AyanBhadury

Same problem trying to upgrade from Angular 11 to 12

"angular-fusioncharts": "^3.2.0",
"fusioncharts": "^3.18.0",
"fusionmaps": "^3.18.0"

Here my error:

Fetching dependency metadata from registry...
                  Package "angular-fusioncharts" has an incompatible peer dependency to "@angular/core" (requires "^4.0.0" (extended), would install "12.2.16").
× Migration failed: Incompatible peer dependencies found.

omanzelli avatar Jan 31 '22 10:01 omanzelli

The problem is not necessarily compatibility with Angular, the Fusioncharts code itself is fine. The problem is in the peerDependencies declaration in angular-fusioncharts (here: https://github.com/fusioncharts/angular-fusioncharts/blob/develop/dist/package.json#L37) and occurs during installation. If the package is preinstalled, and you then switch the Node version, the problem does not occur.

If you would change "@angular/core": "^4.0.0", to "@angular/core": ">=4.0.0", I think that would already solve the issue. A google search for "npm peer dependency multiple versions" provides more examples.

Here is a really small package.json which demonstrates the issue. If you switch to NPM 8 before running npm install (I tested this using nvm) and then install, the error occurs.

{
  "name": "standard-ui",
  "version": "0.0.0",
  "private": true,
  "dependencies": {
    "@angular/common": "~12.2.0",
    "@angular/compiler": "~12.2.0",
    "@angular/core": "~12.2.0",
    "@angular/platform-browser": "~12.2.0",
    "@angular/platform-browser-dynamic": "~12.2.0",
    "angular-fusioncharts": "^3.2.0",
    "fusioncharts": "^3.18.0",
    "rxjs": "~6.6.3",
    "tslib": "^2.3.0",
    "zone.js": "~0.11.4"
  }
}

jberndsen avatar Feb 28 '22 08:02 jberndsen

@itfusion

Please allow for an wider range of Angular package version in your package.json. This package is the only package requiring us to use force upgrades.

E.g.

npx @angular/cli@latest update @angular/core @angular/cli --force

Or via --legacy-peer-deps.

jerone avatar Apr 26 '22 10:04 jerone