Connecting Tech Pros Worldwide Forums | Help | Site Map

advanced line graph

riklaunim@gmail.com
Guest
 
Posts: n/a
#1: Dec 8 '07
I have to make a line graph of entries from last 30 days. I have the
graph but I can't make it look nice - the X line has the day of month
numbers like 29, 30, 1, 2, 3... But I want to group them by month:

....29,30 | 1, 2, 3
Oct | Dec

Is there somewhere a library somewhere that can makes such graphs?
Erwin Moller
Guest
 
Posts: n/a
#2: Dec 8 '07

re: advanced line graph


riklaunim@gmail.com wrote:
Quote:
I have to make a line graph of entries from last 30 days. I have the
graph but I can't make it look nice - the X line has the day of month
numbers like 29, 30, 1, 2, 3... But I want to group them by month:
>
...29,30 | 1, 2, 3
Oct | Dec
>
Is there somewhere a library somewhere that can makes such graphs?
Hi,

Javascript is not really suited to make graphs.
It can be done, but you need lots of positioned divs containing an image
or background color, which is heavy on the client, and takes a lot of
work to make them look nice.

I would advise you to go serverside and use a serverside language that
can make images.
In most serverside languages I have used it is not really difficult, eg
in PHP.
And also lots of good free libs around (eg JPGraph in PHP,
http://www.aditus.nu/jpgraph/).
What you want to do is a breeze in JPgraph, and the images are
autoscaled if you want and always look good, have optinal legendas,
scales, etc.

Regards,
Erwin Moller
riklaunim@gmail.com
Guest
 
Posts: n/a
#3: Dec 8 '07

re: advanced line graph


then I'll check matplotlib as server side is Python :)
Erwin Moller
Guest
 
Posts: n/a
#4: Dec 8 '07

re: advanced line graph


riklaunim@gmail.com wrote:
Quote:
then I'll check matplotlib as server side is Python :)
Hi,

I just checked:
http://matplotlib.sourceforge.net/

and is surely looks like a great lib.
But since I don't do Python (yet), I can only look at the nice pictures
they present. ;-)

Good luck and have fun.

Regards,
Erwin Moller
Evertjan.
Guest
 
Posts: n/a
#5: Dec 8 '07

re: advanced line graph


Erwin Moller wrote on 08 dec 2007 in comp.lang.javascript:
Quote:
riklaunim@gmail.com wrote:
Quote:
>I have to make a line graph of entries from last 30 days. I have the
>graph but I can't make it look nice - the X line has the day of month
>numbers like 29, 30, 1, 2, 3... But I want to group them by month:
>>
>...29,30 | 1, 2, 3
> Oct | Dec
>>
>Is there somewhere a library somewhere that can makes such graphs?
>
Hi,
>
Javascript is not really suited to make graphs.
It can be done, but you need lots of positioned divs containing an image
or background color, which is heavy on the client, and takes a lot of
work to make them look nice.
However it is possible:

<http://devrijehuisarts.org/test/jsgraph.asp>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Closed Thread