ZIP file installation
If you don't have access to internal repository
or you received a ZIP file from us, read on to find out how to install the DXcharts packages from the ZIP file.
Getting a ZIP file
dxchart5-modules, dxchart5-react, and dxstudies packages are most commonly distributed as a ZIP file (a trial version, a custom version, etc).
This is what the ZIP file usually contains:
/dxcharts_lib_5.5.0.zip/dxchart5-modules/dxchart5-react/dxstudies
Setting up your application
There is a lot of ways you can set up your application. For a start, we recommend using create-react-app or npm create vite.
We highly recommend
typescript, becauseDXchartsis fully typed, and it is much easier to get into.
Installing packages from ZIP using the local packages feature
npm and yarn have a mechanism to install local packages.
Run these commands in your project root folder:
# assuming ../dxchart.lib folder is UNZIPPED chart package
npm install ../dxchart.lib/dxchart5-modules
npm install ../dxchart.lib/dxstudies
npm install ../dxchart.lib/dxchart5-react
# or yarn@3.x.x (it's also available in the older versions, but the syntax may be different)
yarn add ../dxchart.lib/dxchart5-modules
yarn add ../dxchart.lib/dxstudies
yarn add ../dxchart.lib/dxchart5-react
After you run these commands, the packages should be installed locally.
Your package.json file should look like this:
{
//...
"dependencies": {
"@dx-private/dxchart5-modules": "./dxchart.lib/dxchart5-modules",
"@dx-private/dxchart5-react": "./dxchart.lib/dxchart5-react",
"@dx-private/dxstudies": "./dxchart.lib/dxstudies"
//...
}
}
DXcharts is a library so it has dependencies as well, including peer dependencies which should be installed. That's why you'll need to run:
npm install
# or yarn
yarn install
Installing react and react-dom
DXcharts React has react and react-dom packages as peerDependencies. If you don't have them, you'll need to install them to your project to make the library work.
The
DXcharts Reactlibrary works only with"react": "17.x.x"and"react-dom": "17.x.x"or higher.
npm install --save react react-dom
# or yarn
yarn add react react-dom
Congratulations! Now you are ready to use the DXcharts React library.
Using the DXcharts React library
If you use React, please follow the guide for React-based applications.
If your choice is Vue, you can check the guide for Vue-based applications.
If you like Angular, you can check the guide for Angular-based applications.
If you prefer Vanilla or other not so widely used frameworks, take a look at the Vanilla guide.