Name+Value graphs

The Pie Graph and Bar Graph are similar in their setup since they both require the parameters name and value in the underlying search. These two graph types only support a single search meaning that you cannot combine multiple datasources for these two graph types.

This chapter will describe how you create a name+value search as well as include some useful tips for the two graph types.

Creating saved searches

When you create your graph searches, make sure of the following:

  • Make sure to set a search title that makes it easy for you and everybody else to know that this search is used in a graph. Make also sure that the name is easy to remember as you will add it to your dataset record in a later step.

  • Assign your search an internal id.

  • The search must be set to Public.


For pie and bar graphs the search used must contain at least two columns, one labelled name and the other one labelled value. This is because the graph requires these two parameters when rendering the graph.

As shown in the below example you must use the summary label if you set the Summary Type to either Sum, Count, Maximum, Minimum or Average. If you use Group or not use any summary type you must set the custom label field.

You can include more columns in your search if you want but these will not automatically be printed in the graph. Best practice is to only include the required columns.

Bar Graph

Below you will find the default attributes set for this graph type as well as an image example image of the rendered graph.

<bargraph
width="400"
height="200"
align="center"
yaxis-label="y-axis label"
xaxis-label="x-axis label"
xaxis-rotate="45"
display-barvalues="top"
display-key="boxed-right"
zwall-grid="horizontal"
zwall-border-color="#e8e8e8"
color-engine="[GRAPHNAME]:hue=random,luminosity=light"
>
<#if [GRAPHNAME]?has_content>
<#list [GRAPHNAME] as curve>
<gdata name="${item.name}" value="${item.value}" color="${item.color}" ></gdata>
</#list>
</#if>
</bargraph>

Pie Graph

Below you will find the default attributes set for this graph type as well as an image example image of the rendered graph.

<piegraph
width="400"
height="200"
align="center"
display-key="boxed-right"
display-percentage="with-key"
color-engine="[GRAPHNAME]:hue=random,luminosity=light"
>
<#if [GRAPHNAME]?has_content>
<#list [GRAPHNAME] as item>
<gdata name="${item.name}" value="${item.value}" color="${item.color}"></gdata>
</#list>
</#if>
</piegraph>

Useful tips and attributes

  • The attribute included in the <gdata> elements called color="${item.color}" is required for the coloring using color sets. Do not remove this attribute.

  • Bar values (bar graph only): If you want to change how to display the barvalues (on top in the example) you can adjust the display-barvalues attribute to "middle" or "insidetop". "none" removes them.