Michael Hill wrote:
Hello, all.
I am considering writing an online graphing utility. I plan it to be
of good quality, such that an undergraduate university student can
print it out and include it with a lab report.
Data points will be entered, having been generated by another program;
the utility will NOT accept functions for plotting--just the data
points.
As far as I know, Javascript does not provide graphing functionality.
Could somebody in this group please let me know what the best language
to use for writing this utility.
If all you are wanting to do is to graph points, that can be easily done
with javascript. Two ways.
Method 1:
Create a grid that is x by y pixels, with each pixel being a div tag
with its background color set, with overflow: hidden; set on it. Then,
loop through the data points, find its corresponding div tag, and change
its background color.
It is the underlying method of this page:
<URL:
http://www.hikksworld.com/graphIt/index.html />
Simply click on two points in the blue, it will draw a red line between
them. Yours would be a lot simpler, because that one determines each
point between the two clicked points, and moves a red image down instead
of changing the background color.
Later tonight, I will work on changing that one to use divs instead of
the image that it uses now.
Method 2:
Accept all the points. Then dynamically create the page, with div tags
(or a table) with background colors accordingly. This might actually be
the simplest method.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -
http://jibbering.com/faq/