Add a library

Copy yourLibrary.js to the ‘src/lib/yourLibrary’ directory and include yourLibrary.js in index.html.

<script type="text/javascript" src="lib/yourLibrary/yourLibrary.js"></script>

Practical example

In a later stage, we will be using the library D3.js to visualize data in the Gauge dizmo.

Copy d3.js to the ‘src/lib/d3’ directory.

Include d3.js in index.html:

<html>
<head>
    ...
    <script type="text/javascript" src="lib/d3/d3.js"></script>
    ...
    <!-- Your own stylesheet (do not remove!)-->
    <link rel="stylesheet" type="text/css" href="style/style.css">
</head>
<body>
...

External resources