felixjo
12-15-2005, 09:54 AM
Hi,
I'm trying to draw a small graph from a datapointer like this:
dv.fillStyle = 0x0000ff;
while (mydp.isValid())
{
if (mydp.isValid())
{
Debug.write(mydp.getNodeName());
var height = mydp.getNodeText();
Debug.write(height);
dv.beginPath();
dv.rect((i-1)*20, 1, 15, height);
dv.fill();
dv.closePath();
}
i++;
xp = xps + i + xpe;
mydp.setXPath( xp );
}
For some reasons the values < 100 seem to be increased by 100 and the values > 100 get really big..
I'll attach a screenshot of the output (the values after 'comments' are used for the height).
I'm trying to draw a small graph from a datapointer like this:
dv.fillStyle = 0x0000ff;
while (mydp.isValid())
{
if (mydp.isValid())
{
Debug.write(mydp.getNodeName());
var height = mydp.getNodeText();
Debug.write(height);
dv.beginPath();
dv.rect((i-1)*20, 1, 15, height);
dv.fill();
dv.closePath();
}
i++;
xp = xps + i + xpe;
mydp.setXPath( xp );
}
For some reasons the values < 100 seem to be increased by 100 and the values > 100 get really big..
I'll attach a screenshot of the output (the values after 'comments' are used for the height).