Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Apr 23, 2017 6:42 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: [ANSWERED] Graph, RRDTool, Title in 2 lines
PostPosted: Mon May 17, 2010 6:38 am 
Offline
Cacti Moderator
User avatar

Joined: Tue Mar 02, 2010 9:03 am
Posts: 348
Is there a possibility to "wrap" the title of a graph in to lines?

Example in the screenshot


Attachments:
lines.jpg
lines.jpg [ 13.12 KiB | Viewed 2543 times ]

_________________
Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

Official Cacti Documentation
Gandalfs Official Debugging Help


Last edited by Sirup on Tue May 18, 2010 2:02 am, edited 1 time in total.
Top
 Profile  
 
 Post subject:
PostPosted: Mon May 17, 2010 7:53 am 
Offline
Developer
User avatar

Joined: Thu Feb 20, 2003 10:16 am
Posts: 1635
Location: Canada
No. RRDTool does not support this.

_________________
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 18, 2010 2:02 am 
Offline
Cacti Moderator
User avatar

Joined: Tue Mar 02, 2010 9:03 am
Posts: 348
Okay thanks a lot.

_________________
Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

Official Cacti Documentation
Gandalfs Official Debugging Help


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 18, 2010 3:12 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Linegod wrote:
No. RRDTool does not support this.
J.P., yes, this is (has been?) the standard answer.

Now that I read it, it comes to my mind that rrdtool 1.4.x supports pango markup. This way, it may be possible to tweak a <br/> into the title. I did not test that. But if plain rrdtool 1.4.x works well, then Cacti 088 will support it!

R.

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 18, 2010 3:21 pm 
Offline
Developer
User avatar

Joined: Thu Feb 20, 2003 10:16 am
Posts: 1635
Location: Canada
I will see what I can do with v1.4 if I get a chance...

_________________
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 18, 2010 4:44 pm 
Offline
Developer
User avatar

Joined: Thu Feb 20, 2003 10:16 am
Posts: 1635
Location: Canada
Just a test below. Not 'simple'.

I will take a look at 0.8.8 and see what I can do....


Attachments:
rrdtool_1.3.9_newline.png
rrdtool_1.3.9_newline.png [ 23.22 KiB | Viewed 2490 times ]

_________________
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2010 2:20 am 
Offline
Cacti Moderator
User avatar

Joined: Tue Mar 02, 2010 9:03 am
Posts: 348
Perfect! :lol:

How did you do this? So this will probably work with cacti 0.88 and rrdtool 1.4.x but not in the combo 0.88/1.4.x?

_________________
Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

Official Cacti Documentation
Gandalfs Official Debugging Help


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2010 7:52 am 
Offline
Developer
User avatar

Joined: Thu Feb 20, 2003 10:16 am
Posts: 1635
Location: Canada
The '--pango-markup' option needs to be passed to the 'rrdtool graph' command. Unicode Entity in hexadecimal notation needs to be passed in the title for newline in the title.

It works with rrdtool 1.3.9, but it will have to wait for 0.8.8, as some logic around when to apply it will have to be included.

_________________
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2010 8:18 am 
Offline
Cacti Moderator
User avatar

Joined: Tue Mar 02, 2010 9:03 am
Posts: 348
Thanks again - for the technical details

_________________
Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

Official Cacti Documentation
Gandalfs Official Debugging Help


Top
 Profile  
 
 Post subject: Re: [ANSWERED] Graph, RRDTool, Title in 2 lines
PostPosted: Fri Jun 17, 2016 12:28 pm 
Offline

Joined: Thu Jul 07, 2005 2:15 pm
Posts: 12
What are the steps that I need in order to put 2 lines in the Title of the graphs.


Top
 Profile  
 
 Post subject: Re: [ANSWERED] Graph, RRDTool, Title in 2 lines
PostPosted: Fri Jun 17, 2016 12:30 pm 
Offline

Joined: Thu Jul 07, 2005 2:15 pm
Posts: 12
My version is Cacti 8.8b

MY RRD is 1.4.x


Top
 Profile  
 
 Post subject: Re: [ANSWERED] Graph, RRDTool, Title in 2 lines
PostPosted: Wed Mar 08, 2017 7:34 am 
Offline

Joined: Wed Mar 08, 2017 7:20 am
Posts: 1
[*] To use the pango-markup feature mentioned by Linegod, you can use it this way:

Code:
--pango-markup --title='<span>Line1&#xa;Line2&#xa;Line3</span>'


The output will look like this (which is probably just fine if you use two lines, but not that pretty if you use more than two lines):

Image



[*] As a work-around, you can use a newline-patch I wrote for rrdtool-1.6.0. You can use it this way (with "?" as our separation character):

Code:
--title='Line1?Line2?Line3'


The output will look like this:

Image

You can find the patch here: https://gist.github.com/petski/6240b64e527c821fc537e0d866cbeec1

Direct download link: https://gist.githubusercontent.com/petski/6240b64e527c821fc537e0d866cbeec1/raw/c3d57da95a0c9ccb3f0d3fe65a33c2ecec082366/rrdtool-1.6.0-newline-in-graphtitle.diff

If you have any remarks on the code, please let me know on the gist page. I'll be happy to merge them!


Attachments:
newlinehack.png
newlinehack.png [ 21.34 KiB | Viewed 96 times ]
pango.png
pango.png [ 21.18 KiB | Viewed 96 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group