How to create a simple bar chart using javascript
<p>The user will input the data for the graph.  I have used a drawline, but I cant get the location right. Here is my code so far. I cant use a bar chart libary, due to java enviroment being embeded into a webpage. </p>

<pre><code>// Ex5-1: Weather Data Graph
enter code herevar canvas;
canvas = openGraphics();
var sun;
var n;
var xposition;
xposition = 40;
sun = prompt("enter the sun");
sun = parseInt(sun, 10);
 ///xposition= xposition +10;
canvas.drawLine(40, 10, 40, 245);
canvas.drawLine(40, 245, 390, 245);
canvas.drawString("225 ", 10, 30);
canvas.drawString("180 ", 10, 70);
canvas.drawString("135 ", 10, 110);
canvas.drawString("90 ", 10, 150);
canvas.drawString("45 ", 10, 190);
canvas.drawString("0 ", 10, 230);
canvas.drawString("J ", 50, 250);
canvas.drawString("F ", 80, 250);
canvas.drawString("M ", 110, 250);
canvas.drawString("A ", 140, 250);
canvas.drawString("M ", 170, 250);
canvas.drawString("J ", 200, 250);
canvas.drawString("J ", 230, 250);
canvas.drawString("A ", 260, 250);
canvas.drawString("S ", 290, 250);
canvas.drawString("O ", 320, 250);
canvas.drawString("N ", 350, 250);
canvas.drawString("D ", 380, 250);
canvas.setStroke(30);
canvas.drawLine(xposition, 230, xposition, sun);
canvas.paint();
</code></pre>
