# Speedometer

The Speedometer gives a quick view of a specific value and range. It is possible to customize the Speedometer to show different colors depending on set rules for the value.

## General

General data is required for all portlets.

[General configuration](/development/flow-portal-2/portlets/common-configuration.md#general)

## Listeners

The portlet can listen to the following events:

* On Row Selection
* On Refresh
* On Point Selection

The portlet can send the following events:

* On Row Selection
* On Refresh

<div align="left"><img src="/files/-M8te-04B8QT7wm13Chg" alt=""></div>

[Listeners configuration](/development/flow-portal-2/portlets/common-configuration.md#listeners)

## Data

### Data source

The portlet data source configuration enables the portlet to execute specified queries towards the chosen database connector to fetch data, or fetch data from a workflow.

* Database: uses a flow connector to retrieve data from a database
* Workflow: runs a workflow to retrieve data

[Data source configuration](/development/flow-portal-2/portlets/common-configuration.md#database-source)

[Workflow source configuration](/development/flow-portal-2/portlets/common-configuration.md#workflow-source)

### Data source columns

Manage: the columns can be configured as a grid view as well as the list view. This view can help for a better overview and quicker configuration when a lot of columns are in use.

Value in Presentation must be filled in before data source columns can be configured.

Click *Execute* in the data source section to fetch the columns. Each column can be configured with:

* display name
* column type

There are a number of column types to choose from. The default column type is text.

* Text: use to display column as a text fields
* Number: use for number fields where the number is an integer
* Decimal: use for numbers with decimals
* Date: will display the column as a date with no time
* Date & Time: use to display date and time

### Presentation

Under *presentation,* add the data to be shown in the speedometer:

* Value: the needle pointer in the speedometer, also shown as a number below the graphics
* Unit: the unit of the value (not mandatory)
* Description: the description to describe the value (not mandatory)
* Min: the minimum value and start point of the speedometer scale - can be a variable or manual input
* Max: the maximum value and endpoint of the speedometer scale - can be a variable or manual input
* Step: the value between each scale marker - can be a variable or manual input

<div align="left"><img src="/files/-M0cAnzvL1-HNRrfWr0q" alt=""></div>

<div align="left"><img src="/files/-M0cAkYt8KYHbXQRiMSj" alt=""></div>

## Speedometer color rules

The speedometer colors can all be configured. As a default, the pointer and scale colors are set to different shades of blue. Click on the color box to configure the pointer and scales colors.

* Range font color: enable to color the scale number values according to setup range color rules
* Pointer color: the color of the needle pointer
* Scale color: the primary color of the scale
* Second scale color: secondary scale color

The preview tab below shows a speedometer with default colors.

{% tabs %}
{% tab title="Set up speedometer color" %}

<div align="left"><img src="/files/-M8pW5l2WDF5CSyG-Rq0" alt=""></div>
{% endtab %}

{% tab title="Preview" %}

<div align="left"><img src="/files/-M0c7sCI6fNXFfbByES-" alt=""></div>
{% endtab %}
{% endtabs %}

The speedometer can have one or more scale color rules. The color rules override the default scale colors.

To enter a new rule:&#x20;

* click *New*
* select a color
* enter a Start and  End value. Value can either be a fixed value or a variable from the drop-down
* preview the result or save

To edit an existing rule, click on the rule and it expands into edit mode.&#x20;

<div align="left"><img src="/files/-M8p_k5nRaqt_bCIM8Gh" alt=""></div>

<div align="left"><img src="/files/-M8pa9dMT_fJrNiXfFeX" alt="Speedometer with color rules and range font color"></div>

## Style‌

Change the header text color and add a header stripe by configuring style.

[Style configuration](/development/flow-portal-2/portlets/common-configuration.md#style)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.novacuraflow.com/development/flow-portal-2/portlets/kpi-portlets/speedometer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
