Home Forums Chart Support Native script mobile app canvas chart issue

Native script mobile app canvas chart issue

Viewing 4 posts - 1 through 4 (of 4 total)
  • #31444

    Hi,
    I am using nativescript with angularJS to develop mobile app in android and ios platform.
    I have used angular charts told by you and integrate the same in our nativescript project. It prepare successfully but when i run it, it show an error everytime as follows :-

    CONSOLE ERROR file: node_modules/@angular/core/fesm5/core.js:4002:0: ERROR Error: Uncaught (in promise): ReferenceError: Can’t find variable: document
    file: app/assets/canvasjs.min.js:36:120
    at ./assets/canvasjs.min.js(file: app/assets/canvasjs.min.js:900:157)
    at __webpack_require__(file: app/webpack/bootstrap:750:0)
    at fn(file: app/webpack/bootstrap:120:0)
    at ./home/home.component.ts(file: app/home/home.component.ts:1:0)
    at __webpack_require__(file: app/webpack/bootstrap:750:0)
    at fn(file: app/webpack/bootstrap:120:0)
    at ./home/home-routing.module.ts(file: app/home/home-routing.module.ts:1:0)
    at __webpack_require__(file: app/webpack/bootstrap:750:0)
    at fn(file: app/webpack/bootstrap:120:0)
    at ./home/home.module.ts(file: app/home/home.module.ts:1:0)
    at __webpack_require__(file: app/webpack/bootstrap:750:0)
    at fn(file: app/webpack/bootstrap:120:0)
    at fn([native code])
    at onInvoke(file: node_modules/@angular/core/fesm5/core.js:26256:0)
    at file: node_modules/@nativescript/angular/zone-js/dist/zone-nativescript.js:138:0
    at file: node_modules/@nativescript/angular/zone-js/dist/zone-nativescript.js:883:0
    at onInvokeTask(file: node_modules/@angular/core/fesm5/core.js:26247:0)
    at file: node_modules/@nativescript/angular/zone-js/dist/zone-nativescript.js:188:0
    at drainMicroTaskQueue(file: node_modules/@nativescript/angular/zone-js/dist/zone-nativescript.js:595:0)
    at file:///a<…>

    so i am not able to show any canvas chart in my native peoject.
    Plz suggest what can i do for this so that we close this and take license for the same.

    Regards,
    shakil

    #31458

    @shakil,

    You can achieve this using WebView. Please take a look at this sample project for an example on the same.

    —-
    Manoj Mohan
    Team CanvasJS

    #31476

    Hi Manoj Mohan,

    Your are using web-view to show canvas charts in mobile app.
    Means the canvas chart that you are making in web application, same will be shown in mobile by using its source path in web view.

    Can we have its own package that we can use in native-script project? Other wise it has full dependency on web application.

    #31506

    @shakil,

    WebView is the possible solution as of now.

    —-
    Manoj Mohan
    Team CanvasJS

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.