CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
Module - GD::Graph - need \n in title and x_label(s)

 



coder
New User

Jul 4, 2006, 12:22 PM

Post #1 of 4 (997 views)
Module - GD::Graph - need \n in title and x_label(s) Can't Post

Greets,

I'd like to ad a line break in my graph title and also the x_label(s)

No workie:

$mygraph->set(

$title => "Field $field_name: \n $graph_title_date Through $graph_title_date2",

);

Is there someone here that can clue me in how to pass a newline char to the GD module?

Much appreciated.


(This post was edited by coder on Jul 4, 2006, 12:34 PM)


KevinR
Veteran


Jul 4, 2006, 12:44 PM

Post #2 of 4 (994 views)
Re: [coder] Module - GD::Graph - need \n in title and x_label(s) [In reply to] Can't Post

what do you mean by it doesn't work? Dos the script crash or does the newline get stripped out or something else? If you are viewing the output in a browser newlines have no affect, you have to use html code for that.
-------------------------------------------------


coder
New User

Jul 4, 2006, 2:17 PM

Post #3 of 4 (991 views)
Re: [KevinR] Module - GD::Graph - need \n in title and x_label(s) [In reply to] Can't Post

Hi,

The script doesn't crash. I'm referring to the actual PNG file not an HTML page. The \n displays as an odd character in the graph.

The main problem I'm facing is the x_label(s) are lengthy timestamps and overlap (unless I use x_labels_vertical =>1 which is not desired by my client).

So I'd like to incorporate a line break in the labels so they are readable.

Thanks.


coder
New User

Jul 4, 2006, 2:32 PM

Post #4 of 4 (989 views)
Re: [KevinR] Module - GD::Graph - need \n in title and x_label(s) [In reply to] Can't Post

btw... I'm aware of GD::Text::Wrap but I couldn't get it to fly and coundn't find any examples of anyone doing that with labels.

Suggestions?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives