[ANSWERED] Graph, RRDTool, Title in 2 lines
Moderators: Developers, Moderators
[ANSWERED] Graph, RRDTool, Title in 2 lines
Is there a possibility to "wrap" the title of a graph in to lines?
Example in the screenshot
Example in the screenshot
- Attachments
-
- lines.jpg (13.12 KiB) Viewed 4201 times
Last edited by Sirup on Tue May 18, 2010 2:02 am, edited 1 time in total.
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
Okay thanks a lot.
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
J.P., yes, this is (has been?) the standard answer.Linegod wrote:No. RRDTool does not support this.
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.
Perfect!
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?
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?
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
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.
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
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Thanks again - for the technical details
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
Re: [ANSWERED] Graph, RRDTool, Title in 2 lines
What are the steps that I need in order to put 2 lines in the Title of the graphs.
Re: [ANSWERED] Graph, RRDTool, Title in 2 lines
My version is Cacti 8.8b
MY RRD is 1.4.x
MY RRD is 1.4.x
Re: [ANSWERED] Graph, RRDTool, Title in 2 lines
[*] To use the pango-markup feature mentioned by Linegod, you can use it this way:
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):
[*] 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):
The output will look like this:
You can find the patch here: https://gist.github.com/petski/6240b64e ... d866cbeec1
Direct download link: https://gist.githubusercontent.com/pets ... title.diff
If you have any remarks on the code, please let me know on the gist page. I'll be happy to merge them!
Code: Select all
--pango-markup --title='<span>Line1
Line2
Line3</span>'
[*] 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: Select all
--title='Line1?Line2?Line3'
You can find the patch here: https://gist.github.com/petski/6240b64e ... d866cbeec1
Direct download link: https://gist.githubusercontent.com/pets ... title.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 (21.34 KiB) Viewed 1754 times
-
- pango.png (21.18 KiB) Viewed 1754 times
Who is online
Users browsing this forum: No registered users and 1 guest