[ZBXNEXT-380] Customize font in map labels Created: 2010 May 26  Updated: 2025 Apr 08

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F)
Affects Version/s: None
Fix Version/s: None

Type: Change Request Priority: Major
Reporter: Ricardo Santos Assignee: Unassigned
Resolution: Unresolved Votes: 30
Labels: font, maps
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Sub-task

 Description   

Costumizing font and colours for labels in maps would increase it's usability in monitoring screens.



 Comments   
Comment by richlv [ 2010 May 26 ]

you can define font in defines.inc.php file - would that be enough ?

Comment by Ricardo Santos [ 2010 May 26 ]

For me yes.

But for the sake of GUI administration that zabbix has, I don't think so. Or else it will became naggixx.....

Comment by Ricardo Santos [ 2010 May 26 ]

Wrong explanation from me.

What I think it's nice to have is an element in map which is a label that we could change the font and font color.

Comment by richlv [ 2010 Jun 07 ]

ok, so something like a new map element "label" or "text", where one can specify font, font size & colour ?

while that could be done with an image as well, it would be more convenient to have such a functionality built in, and it would also allow to specify macros in such labels.

Comment by Ricardo Santos [ 2010 Jun 07 ]

The images are not suitable for macro labeling.

Imagine that we want to inform in a screen (for management for example) the number of accesses in a day. A label like that woud be useful because it would allow to print that information on a map in a graphical and attractive way.

Comment by dougbee [ 2012 Feb 23 ]

In addition, I'd like to be able to create maps with a dark background (to match the nice "Dark blue" theme); this is possible by using a background image that's simply all black. However the end result is unattractive black-on white labels. Custom font colors would fix the issue.

Comment by richlv [ 2012 Sep 05 ]

patch available in ZBXNEXT-1311

Comment by richlv [ 2012 Sep 07 ]

ideally, both font & font size could be chosen for as many elements as possible (title, element name, status, timestamp, zabbix url...)

Comment by Raymond Kuiper [ 2014 Apr 17 ]

Perhaps using a BB or wiki style formatiing might be an option as well. This way tags could be used to genereate bold, italic, etc.

Comment by Ebonweaver [ 2015 Apr 15 ]

Since you can put in variables for a label to pull item data, I would love to see the abitlity to use basic html at the very least to change font, size, color, style. For example I have labels that are entire blocks of text with several lines of labels followed by different data being pulled to create a list of current supply levels on printers. I'd love to be able to bold the first line with a b tag (printer name) and underline each item with a u tag (black, cyan, etc) while leaving the data normal. It would make it much more readable.
That's a basic starting point, if you wanted to add a WYSIWYG editor that would be amazing.

Comment by richlv [ 2017 Mar 26 ]

this issue has become slightly unclear. is it about adding custom labels with data ?
is it about customising element labels ?

should be clarified. as a sidenote, it could have been solved by ZBXNEXT-2031, but looks like the current implementation does not solve it.

Comment by Ebonweaver [ 2017 Mar 26 ]

Not sure what you're getting at. To me, custom labels with data and customizing the labels on an icon (is that what you mean by element?) are the same thing. When you add an icon to a map, the label is either static text, macros to call data, or both. In any of these cases, being able to change font style, size, and color, not just in one way on all text on a given icon, but multiple places in that label, would be great.

In other words, I have an icon that is a printer of type host. In its label I have:

{HOST.HOST}
Status......{{HOST.HOST}

:HPPrinterStatusMessage.last(0)}
Device......{{HOST.HOST}:HPDeviceStatus.last(0)}
Printer......{{HOST.HOST}:HPPrinterStatus.last(0)}
Yellow......{{HOST.HOST}:prtMarkerSuppliesLevel.1.1.last(0)}
Cyan........{{HOST.HOST}:prtMarkerSuppliesLevel.1.3.last(0)}
etc...

So for example if we could use HTML in the label, I could do something like:
<b><font size=4>

{HOST.HOST}</font></b>
<u>Status</u>......{{HOST.HOST}

:HPPrinterStatusMessage.last(0)}
etc...

This allows us to format size, style, and color of the text portions in a label.
As for the map name itself, that also should have format options, including being hidden. Some times we don't want the name on the map. Some times we'd like the name to be much more prominent or a different color, or both.

Past that having free text elements rather than needing to do something like have an icon that is a little blank png would be nice, but that's somewhat past this initial request I think.
And just to say it, though again past scope probably, if trigger interpretation was available in text macros and this requested formatting that would be really sweet. For example:
Status......{{HOST.HOST}:HPPrinterStatusMessage.last(0)

{Trigger(triggername).Host}

:colors(green,red)}}
So not an html function at that point, but a macro saying if the trigger of [name] on the host (of this host icon) is in state ok make the text green, if in problem make it red. I probably propose this in a totally insane way format and function wise, just laying out the concept.

Comment by Ebonweaver [ 2017 Mar 26 ]

Not sure why extra line returns are being randomly inserted into the code examples I posted but I can't seem to remove them...

Comment by Jack Valko [ 2018 Jan 03 ]

This is still an issue in 3.4.

We have these great looking maps with tiny tiny text that no one can read from a distance. New dashboards make this issue worse because map images in widgets generally scale down.

Having the option to enter a font_size for a map element would fix this.

Comment by Scrooch [ 2019 Jan 23 ]

It's still problem...

Comment by Radek Pavlík [ 2019 Aug 23 ]

Maybe we need only CSS custom configuration? Its realy that hard to modifiing Map fonts?

Comment by igors [ 2020 Feb 13 ]

Font size and color should be cusotmizable for each map element, that's obvious thing, why developers are so stubborn on this one?

Users are forced to get some 3rd party gui for monitoring dashboards because of lack of simple to implement functionality.

 

Comment by Kolunchik [ 2025 Apr 08 ]

Any news? Good way to change font size, label background color?

Generated at Thu May 15 06:48:35 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.