Installing and setting up RaphaelJS is very simple, it's as simple as downloading the latest RaphaelJS file and including it in HTML.
In three easy steps, you can install RaphaelJS and get it set up.
Before you install RaphaelJS, you will need to check that you have all of the following required elements:
A web browser
A text editor
The easiest way to download RaphaelJS is as a minified JS, from https://raw.github.com/DmitryBaranovskiy/raphael/master/raphael-min.js.
RaphaelJS, unlike most libraries, does not have any other dependencies, so it's just raphael.js
.
Since RaphaelJS is a JavaScript plugin, the download link will show a plain JavaScript file in the browser. You should copy the text and paste it into a new file named raphael.js
(or any name you prefer), and save it to your JavaScript directory or to any location in your server.
Include it in the bottom section of your HTML page using the <script>
tag and point the src
attribute to the path where the raphael.js
file is located.
Note
The browser reads the HTML code in a linear fashion. If there is a script tag at the top, the browser will download the script and it will start executing it. During this stage, the browser displays a blank white screen, as the rest of the page is yet to be downloaded. Therefore, it is recommended to include the script at the bottom of the page, so that the browser will download all the HTML code and the user will have some content on the screen, while JavaScript is being downloaded in the background.