ApexCharts is not defined
See original GitHub issueHi, First of all, I congratulate you for this work. Great work! I wanted to use ng-apexcharts in my project. but I get this error. please help me…
ReferenceError: ApexCharts is not defined at ChartComponent.push…/node_modules/ng-apexcharts/fesm5/ng-apexcharts.js.ChartComponent.createElement (ng-apexcharts.js:132) at AsapAction.<anonymous> (ng-apexcharts.js:58)
app.module.ts:
import { NgApexchartsModule } from 'ng-apexcharts';
### Angular CLI:
{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "ang-route1": { "root": "", "sourceRoot": "src", "projectType": "application", "prefix": "app", "schematics": {}, "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", "options": { "outputPath": "dist/ang-route1", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.app.json", "assets": [ "src/favicon.ico", "src/assets" ], "styles": [ "src/styles.css" ], "scripts": [ "./node_modules/apexcharts/dist/apexcharts.min.js" ], "es5BrowserSupport": true }, "configurations": { "production": { "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" } ], "optimization": true, "outputHashing": "all", "sourceMap": false, "extractCss": true, "namedChunks": false, "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, "budgets": [ { "type": "initial", "maximumWarning": "2mb", "maximumError": "5mb" } ] } } }, "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "ang-route1:build" }, "configurations": { "production": { "browserTarget": "ang-route1:build:production" } } }, "extract-i18n": { "builder": "@angular-devkit/build-angular:extract-i18n", "options": { "browserTarget": "ang-route1:build" } }, "test": { "builder": "@angular-devkit/build-angular:karma", "options": { "main": "src/test.ts", "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.spec.json", "karmaConfig": "src/karma.conf.js", "styles": [ "src/styles.css" ], "scripts": [], "assets": [ "src/favicon.ico", "src/assets" ] } }, "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": [ "src/tsconfig.app.json", "src/tsconfig.spec.json" ], "exclude": [ "**/node_modules/**" ] } } } }, "ang-route1-e2e": { "root": "e2e/", "projectType": "application", "prefix": "", "architect": { "e2e": { "builder": "@angular-devkit/build-angular:protractor", "options": { "protractorConfig": "e2e/protractor.conf.js", "devServerTarget": "ang-route1:serve" }, "configurations": { "production": { "devServerTarget": "ang-route1:serve:production" } } }, "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": "e2e/tsconfig.e2e.json", "exclude": [ "**/node_modules/**" ] } } } } }, "defaultProject": "ang-route1" }
### package.json :
"@angular/animations": "~7.2.0", "@angular/common": "~7.2.0", "@angular/compiler": "~7.2.0", "@angular/core": "~7.2.0", "@angular/forms": "~7.2.0", "@angular/platform-browser": "~7.2.0", "@angular/platform-browser-dynamic": "~7.2.0", "@angular/router": "~7.2.0", "apexcharts": "^3.6.7", "core-js": "^2.5.4", "ng-apexcharts": "^1.0.1", "popper.js": "^1.14.7", "rxjs": "~6.3.3", "tslib": "^1.9.0", "zone.js": "~0.8.26"
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7
Top GitHub Comments
I’m getting this same error, with latest versions (apexcharts@3.8.5 and ng-apexcharts@1.0.5) as well as the suggested (apexcharts@3.6.8 and ng-apexcharts@1.0.2) using Angular 8
I’m getting this same error, with latest versions (apexcharts@3.8.5 and ng-apexcharts@1.0.5) as well as the suggested (apexcharts@3.6.8 and ng-apexcharts@1.0.2) using Angularjs 1.7