graphs in web pages, part 2 (PHP)
displaying a graph in php IS more difficult than with perl: takes more time, more lines of code (105 vs. 60 in my case) and does not look as good.
first, a couple of PEAR modules must be installed- image canvas and image graph (which is no different from installing the module in perl).
second, since the default fonts look horrible, some "true type fonts" must be downloaded and placed in a certain directory (perl fonts look fine to start with).
third, to display a line, markers at the peaks, and the values at the peaks requires three separate objects, each of which require several lines of code to configure. perl codes this much more elegantly and intuitively.
in the end i was able to insert this graph into my session-maintaining website by including it as an image: img src="graph.php"
first, a couple of PEAR modules must be installed- image canvas and image graph (which is no different from installing the module in perl).
second, since the default fonts look horrible, some "true type fonts" must be downloaded and placed in a certain directory (perl fonts look fine to start with).
third, to display a line, markers at the peaks, and the values at the peaks requires three separate objects, each of which require several lines of code to configure. perl codes this much more elegantly and intuitively.
in the end i was able to insert this graph into my session-maintaining website by including it as an image: img src="graph.php"
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home