Home Forums Chart Support Installing from NPM

Installing from NPM

Viewing 2 posts - 1 through 2 (of 2 total)
  • #60393

    This is probably a FAQ or RTFM, but I have only previously worked in a plain old HTML5 application and now want to use Cancas JS in a react app.

    For my HTML5 app, I have a paid commercial license and have downloaded the JS code, which I drop into my lib dir and use the good old fashioned HTML way.

    Now, I want to add Canvas JS to my react app. I can of course download and drop the js into my project, but if I want to use ‘npm install’, how do I tell ‘npm install’ that it needs to get the version of Canvas JS that I’ve paid for?

    Thanks,
    Peter

    #60438

    Peter,

    You can download the commercial version package from the My Account page and the steps to integrate have been addressed in the instruction.html file which is present inside each package under the @canvasjs folder. For example, if you are integrating CanvasJS charts with Angular, download the commercial version and navigate to @canvasjs > angular-charts > instruction.html

    Additionally, you can even host the commercial version of the CanvasJS chart package (@canvasjs/charts) on your own server by following these steps:

    1. Compress the package into a .tar.gz file.
    2. Upload the compressed file to your server.
    3. In your package.json, reference the package using the URL of your server, like this:

    @canvasjs/charts": "https://your-domain.com/packages/canvasjs-charts-v3.11.0.tar.gz

    This approach avoids conflicts with public npm versions and integrates smoothly into your app. Please refer to this article for more information.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.