Getting Started with Timeplot

=How to Create Timeplots=

Getting Started
Here are a few easy steps to create a simple timeplot. Open up your favorite text or HTML editor and start creating an HTML file.

Step 1. Link to the API
In your HTML code, link to Timeplot's Javascript API code as follows:

...    ...   ...

Step 2. Create a DIV Element
Create a div element in your HTML code, e.g.

You should give it an ID as well as fix its height.

Step 3. Call Timeplot.create
Add two event handlers, onload and onresize, to the body element:

 ...

Then write the following code in a script block or a separate Javascript file:

Note that if we put the code to construct the timeplot in the onload handler to make sure that when we start to use Timeplot's API, all its code has been loaded. That code creates an empty timeplot, as the one here below.