i wanted to make fusion chart in java script.. The code i have written is as per below. ca
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;&lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt;
&lt;title&gt;Point Plotter&lt;/title&gt;
&lt;script type=”text/javascript”&gt;
var Point = function (x, y) {
this.x = x;
this.y = y;
};
/**
* Function to fill up a line with equidistant points in a given sparsity.
*/

var fillWithPoints = function (start, end, sparsity) {
// Validate parameters.
if (!(start instanceof Point &amp;&amp; end instanceof Point &amp;&amp; typeof sparsity === undefined))
{
throw new SyntaxError('InvalidArgumentException');
}
// Calculate total items.
var items = Math.pow(Math.pow(end.x - start.x, 2) -
Math.pow(end.y - start.y, 2), 0.5) / sparsity,
Step = new Point((end.x - start.x) / sparsity, (end.y - start.y) / sparsity ),
i, points = [];
// Populate points.
for (i = 1; i &lt;= items; i++) {
points.push(Point(start.x + step.x * i, start.y + step.y * i));
}
return points;
};
/**
* Function to draw an array of points on screen
*/
var plotPointArray = function (points) {
// Validate parameters.
if (!(points instanceof Array)) {
throw new SyntaxError('InvalidArgumentException');
}
var node, i;
// Create HTML element
for (i = 0; i &lt; points.length; i++) {
node = document.createElement("div");
node.setAttribute('style',
'width: 3px; height: 3px; background: #cc3333; position: absolute');
node.style.top = points[i].y;
node.style.left = points[i].x;
document.appendChild(node);
}
};
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;input type="button" onclick="plotPointArray(fillWithPoints(new Point(120, 120), new Point(540, 380), 20));"&gt;
&lt;input type="button" onclick="plotPointArray(fillWithPoints((new Point(540, 120)),(new Point(120, 380)), 20));"&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>please can any one help me on this.......</p>
