First Start
The library works out of the box, but you have to set up your HTTP server to bind Library’s folder to a certain domain name.
Let’s start the the library on your local computer
1. Clone this repository
Learn more about how to clone a repository.
2. Start an HTTP server
You may set up any HTTP server to listen to any of your host’s free ports and refer to the folder containing the library. Below you will find instructions on how to start several most common HTTP servers.
Python 2.x
If you have Python installed on your computer then you can use it to start an HTTP server in a quick manner.
Execute the following command in the library folder:
python -m SimpleHTTPServer 9090
Python 3.x
python -m http.server 9090
NodeJS
First install http-server
:
npm install http-server -g
Start http-server
using the following command in the library folder:
http-server -p 9090
NGINX
Install NGINX
Open the config file
nginx.conf
and write the following text in thehttp
section of the file:server {
listen 9090;
server_name localhost;
location / {
root ABSOLUTE_PATH_TO_THE_CHARTING_LIBRARY;
}
}Replace
ABSOLUTE_PATH_TO_THE_CHARTING_LIBRARY
with the absolute path to the library folder.Run
nginx
3. Open the the library in your browser
Once you are done running the HTTP server, you will have your Advanced Charts ready.
Open http://127.0.0.1:9090 in your browser.
Online Example
You may see the working example of Advanced Charts here. This example is based on our sample data feed.
IMPORTANT: This datafeed is just a sample. It contains a dozen of symbols (from Quandl) and provides DWM only. It does however support quotes. Please use it for testing purposes only.
Hosting the library on a separate origin (domain)
If you would like to host the library on a separate origin to the page containing the chart then please view the following guide: Hosting the library on a separate origin.