JavaScript Diagram Builder - The Dot object

The Dot object is used to display a dot on the screen, especially to draw it in a diagram area. In order to find the appropriate screen position of a dot, the diagram functions ScreenX, ScreenY, RealX and RealY can be used. It is also possible, to move, hide and delete a dot after it has been drawn.
This diagram was generated by

<SCRIPT Language="JavaScript">
document.open();
var D=new Diagram();
D.SetFrame(80, 160, 640, 460);
D.SetBorder(6, 18, 1, 6);
D.SetText("","", "Dot objects");
D.Draw("#FFFFFF", "#000000", false);
var Size, Type, x, d=Math.floor(Math.random()*6);
Color=new Array("#000000","#FF0000","#0000FF","#000000","#FF0000","#0000FF");
for (Size=6; Size<=18; Size++)
{ x=D.ScreenX(Size);
  for (Type=1; Type<=6; Type++)
    new Dot(x, D.ScreenY(Type), Size, Type+d, Color[Type-1], "Type:"+eval(Type+d)+", Size:"+Size);
}
document.close();
</SCRIPT>

You can use the following methods:

« The Bar object The Pixel object »