Good afternoon,

I've got a bandwidth sensor and usually I use the "Live graph (No labels)" object to represent it on maps. I want to make it better creating a div that has his background color related to the sensor status with a title.

So I created this:

<div class="map_object map_icon2 map_icon_large <#sensor type="colorclassofstate" prefix="map_iconcolor_" id="<@objectid>">" id="<@itemid>" objectid="<@objectid>" subid="<@subid>" style="border: 1px solid black; <#mapobject type="coordinates" subid="<@subid>" mode="<@editmode>">">
	<#mapobject type="objectgrip" mode="<@editmode>">
	<#mapobject type="htmlbefore" subid="<@subid>">
  <#checkobjecttype objecttype="sensor" nicemessage="true" id="<@objectid>">

  <span class="label"><#objectproperty name="Name" id="<@objectid>"></span>
<#object forcepng="true" type="graph" id="<@objectid>" graphid="0" graphstylefile="graphstyling.htm" datastylefile="graphdatastyling.htm" animationstylingfile="graphanimationstyling.htm"  tooltexts="1"  graphstyling="baseFontSize='0'%20showLegend='0'%20showAxis='0'" datastyling="anchorRadius='1'%20lineThickness='1'" >
  <#mapobject type="htmlafter" subid="<@subid>">
</div>

it works but I've got a problem: the graphs comes out the border of the div and I can't make it stay in the div.

The problem

How can I fit it?


Article Comments

Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.

Hi Andrea,

Right now, the graph will always inherit the height of the map object. You can now set a fixed height of the map object, or you can add the name into the object's graph title.

This will look like that:

<#checkobjecttype objecttype="sensor" nicemessage="true" id="<@objectid>"> <
" id="<@itemid>" objectid="<@objectid>" subid="<@subid>" style="<#mapobject type="coordinates" subid="<@subid>" mode="<@editmode>" >"> <#mapobject type="objectgrip" mode="<@editmode>"> <#mapobject type="htmlbefore" subid="<@subid>"> <#objectproperty name="Name" id="<@objectid>" var="objname"> <#object forcepng="true" type="graph" id="<@objectid>" graphid="0" graphstylefile="graphstyling.htm" datastylefile="graphdatastyling.htm" animationstylingfile="graphanimationstyling.htm" tooltexts="1" graphstyling="baseFontSize='12'%20showLegend='1'%20showAxis='0'" datastyling="anchorRadius='1'%20lineThickness='1'" width="<@width>" height="<@height>" graphtitle="@objname" varexpand="graphtitle"> <#mapobject type="htmlafter" subid="<@subid>">

Paessler Note: Kindly note that we cannot give extended support to customize map objects. These proposals come as they are.

Best regards, Felix


Jul, 2016 - Permalink

Good afternoon,

thanks for the reply but this doesnt fix the problem: I need only the name of the sensor and if I enable the legend I'll see alot of texts that take alot of space.

I found a solution: I put the sensor name label after the graph. In this way the graph fit the colored div and the sensor name is readable and clear.


Jul, 2016 - Permalink