JavaScript Diagram Builder - Static Example

The diagrams on this page are static in a sense, that after the objects are created, they are never changed. Here are shown several date scales, which can be in the range from seconds up to years. Unfortunately, there are many different date formats in the world (for instance day.month, day-month, month/day). If you want to use another date format, then you can add it to the function _DateFormat() in the file 'diagram.js'.
Code example for a diagram with date scale:

<SCRIPT Language="JavaScript">
D=new Diagram();
Date.UTC(2001,0,1,0,0,0), //date/time (left): year, month(0..11), day, hour, min, sec
Date.UTC(2001,11,31,23,59,59), //date/time (right): year, month(0..11), day, hour, min, sec
0, 1); //any y scale
//change the scale type from default=1 into 2 or higher before drawing:
D.XScale=2; //2,3,4=predefined date scales; 5,6,..=userdefined date scales
//get the screen position of a date/time for the display of bars, dots or pixels:
var x=D.ScreenX(Date.UTC(2001,10,11,11,11,0));

« The Pixel object Dynamic Example »