Finally decided to play with the canvas for the first time. My box shows up fine but the actual squares to make the graph and the line does not. Following this from online and I suspect there is something with their code. But before I scrap it and look for somekthing else, I was wondering if I could in fact fix this since I did learn something from it at least originally?
Here is the code.
[code]
<canvas id=”graph” width=”500″ height=”365″ style=”border-style:solid;”>
</canvas>
<script>
var g = document.getElementById(“graph”);
var context = g.getContext(“2d”);
for (var x=0.5; x<500; x+=10)
{
context.MoveTo(x,0);
context.LineTo(x,365);
}
for (var x = 0.5; x < 500; x += 10) {
context.moveTo(x, 0);
context.lineTo(x, 375);
}
for (var y = 0.5; y < 375; y += 10) {
context.moveTo(0, y);
context.lineTo(500, y);
}
context.strokeStyle = “#FF0000”;
context.stroke();
context.beginPath();
context.moveTo(0, 40);
context.lineTo(240, 40);
context.moveTo(260, 40);
context.lineTo(500, 40);
context.moveTo(495, 35);
context.lineTo(500, 40);
context.lineTo(495, 45);
context.moveTo(60, 0);
context.lineTo(60, 153);
context.moveTo(60, 173);
context.lineTo(60, 375);
context.moveTo(65, 370);
context.lineTo(60, 375);
context.lineTo(55, 370);
context.strokeStyle = “#000”;
context.stroke();
</script>
Thanks