...

View Full Version : PHP, GD and Diagonal lines.



DaveHope
09-30-2003, 06:22 PM
Hello all, Just a quick, or atleast I hope, a quick question :P

I'm starting to play with GD (as part of a personal project I'm working on which produces live statistics from apache log files). I've got all the data avaliable dynamically, I now plan to graph it using GD however have seen no refernece to diagonal lines, which would be somewhat important in a line graph :P Does anyone know if diagonal lines exist in GD and if so how they're used?

Thanks !

Íkii
09-30-2003, 07:16 PM
imageline($img_pointer, 0, 0, 50, 50, $colour);

would draw a line from 0,0 to 50,50 which would be ummm diagonal.

You should really consider caching the stats and graphs on a daily basis using a task scheduler such as cron.

on an aside: I'm currently (between projects) working on a graphing application suite with a 3D bias - this image (http://www.teckis.com/scriptix/datagraphs/s.php.png) was produced through a user function that accepts an array of data. I vaguely planned to run a perspective feature on the scale as the shading gives the impression of angles. Have quite a way to go on that one though have mostly finished the parent class.
you might also want to google for graphing applications in php as there are a fair few.

DaveHope
09-30-2003, 07:34 PM
Thanks!

Just seen the edited message, yea, I took a while to actually submit my reply ;P - Wow. That looks cool, but I think I'll stick to this more basic stuff ;P



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum