JavaScript Diagram Builder - The Diagram object

The Diagram object provides the possibility, to draw a diagram at a defined position with a defined size on the window document. The appropriate scale will be drawn automatically, corresponding to the specified xmin, xmax, ymin and ymax values. The diagram provides - also when not drawn - some useful functions which can be used to transform screen positions into real world positions and vice versa.
This diagram was generated by

<SCRIPT Language="JavaScript">;
var D=new Diagram();
D.SetFrame(80, 160, 420, 360);
D.SetBorder(10, 50, 0, 4);
D.SetText("X-Label","Y-Label", "Title");
D.Draw("#80FF80", "#0000FF", true, "Click on me !", "DiagramClick()");
function DiagramClick()
{ alert("Use your own function here.");
You can use the following methods: Before drawing, you can set the following properties:

« Introduction The Bar object »