JavaScript Diagram Builder - The Line object

The Line object is used to display a line on the screen, especially to draw it in a diagram area. It is possible to hide, move and delete a line after it has been drawn. Unlike in older versions, the images o_rrggbb.gif are no longer required to draw Line objects.
This diagram was generated by

<SCRIPT Language="JavaScript">
function Fahrenheit(vv){ return("<nobr>"+Math.round(vv*18+320)/10+" F</nobr>"); };
var D=new Diagram();
D.SetFrame(80, 160, 520, 360);
D.SetBorder(6, 18, 20, 30);
D.SetText("","", "temperature measured during the day");
D.XScale=" h";
D.YScale=" C";
D.Draw("#FFEECC", "#663300", false);
var t, T0, T1;
for (t=D.YGrid[0]; t<=D.YGrid[2]; t+=D.YGrid[1])
  new Bar(D.right+6, D.ScreenY(t)-8, D.right+6, D.ScreenY(t)+8, "", Fahrenheit(t), "#663300");
for (t=6; t<18; t++)
{ T0=T1;
  new Line(D.ScreenX(t), D.ScreenY(T0), D.ScreenX(t+1), D.ScreenY(T1), "#cc9966", 2, "temperature");

You can use the following methods:

« The Pixel object The Area object »