Home forums Using CanvasJS How can i use canvasjs in ionic 2?

This topic contains 3 replies, has 2 voices, and was last updated by  Vishwas R 1 week, 5 days ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #20945

    Nava
    Member

    Is there a tutorial or some information about this?

    #20954

    Vishwas R
    Keymaster

    @danniela_navarrete77,

    You can save CanvasJS file (canvasjs.min.js) in src folder of your project (‘src/assets/js’ or ‘src/lib’) and import the CanvasJS library to your app using import CanvasJS from 'canvasjs.min' (path may vary based on file location like ‘./src/assets/js/canvasjs.min’ or ‘./src/lib/canvasjs.min’). Or you can add it in your html file using script-tag. Please take a look at this ionic documentation on Adding 3rd Party Libraries.

    Also please refer this tutorial on How to Install 3rd Party Libraries in Ionic 2 and step-by-step guide given in this github thread for more info.


    Vishwas R
    Team CanvasJS

    #20993

    Nava
    Member

    so.. if i want to make the example of render chart by input. how can i fit my code?
    what part will go in .html and .ts
    p.d. i’m learning to use it :C

    #20997

    Vishwas R
    Keymaster

    @danniela_navarrete77,

    Just like having DOM in a website/web-app, you can create a DOM for chart-container in html and script-part goes inside js/ts (based on your usage) files. Please take a look at this tutorial on Building Mobile App with Angular & Ionic. Also please refer this tutorial on Ionic.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.