Skip to content

Chart

Indicators

Based on the search count

This type of indicators will get the number of search results based on the domain of the action and will display it as the value.

<graph type="indicator" color="red:value&gt;4;green:value&lt;5"
icon="skull:value&gt;4;smile:value&lt;5"
/>

We can also show the total of the search results using the attribute totalDomain.

<graph type="indicator" color="red:value&gt;4;green:value&lt;5"
icon="skull:value&gt;4;smile:value&lt;5"
totalDomain="[('user_id','=',1)]"
/>

And we can show the percentage of the search results using the attribute showPercent.

<graph type="indicator" color="red:value&gt;4;green:value&lt;5"
icon="skull:value&gt;4;smile:value&lt;5"
totalDomain="[('user_id','=',1)]"
showPercent="true"
/>

We can use the following variables to customize the icon and color values using conditions.

  • value: The value of the search results.
  • total: The total of the search results.
  • percent: The percentage of the search results.

Based on the value of a field

Is similar to the previous one but instead of using the count of search results, we read the field of the search results and apply an operation to get the value.

<graph type="indicatorField" color="green:value&gt;4;red:value&lt;5"
icon="like:value&gt;4;dislike:value&lt;5">
<field name="effective_hours" operator="+"/>
</graph>

We can use the following operators:

  • +: Sum of the values.
  • -: Subtraction of the values.
  • *: Multiplication of the values.
  • avg: Average of the values.
  • max: Maximum of the values.
  • min: Minimum of the values.