jarn
January 25th, 2005, 03:29 PM
Use layers to create plots within a browser. Each point to be plotted is rendered via a layer (using the DIV tag). Mozilla/Firefox/IE seem to handle thousands of layers without any problem. Can attach event handler to each point for additional interactivity. Snippet example is housed within a JSP at the location below.
Same technique can be used to create lines between rendered objects on the fly. Compute the equation of a line between two rendered objects. Plot the line point by point and render via div's.
Have fun....
demo @ www.datacorner.com/coding/doPlotGRF.jsp (http://www.datacorner.com/coding/doPlotGRF.jsp)
get the source @ www.datacorner.com/coding/doPlotGRF.txt (http://www.datacorner.com/coding/doPlotGRF.txt) (and then right click to view source)
Same technique can be used to create lines between rendered objects on the fly. Compute the equation of a line between two rendered objects. Plot the line point by point and render via div's.
Have fun....
demo @ www.datacorner.com/coding/doPlotGRF.jsp (http://www.datacorner.com/coding/doPlotGRF.jsp)
get the source @ www.datacorner.com/coding/doPlotGRF.txt (http://www.datacorner.com/coding/doPlotGRF.txt) (and then right click to view source)