# Record KPI

GridMate provides a component to display number or percentage values in a graphical view.

In this tutorial, we will setup a Record KPI of the opportunity Amount and Opportunity. Below is a quick demo on how to configure the KPI components.

{% embed url="<https://youtu.be/vkD3I7myb-Y>" %}
GM - Record Kpi
{% endembed %}

```coffeescript
{
   "sections": [
      {
         "name": "opportunityKPIList",
         "label": "Opportunity KPI",
         "active": true,
         "cols": 3,
         "rows": [
            [
               {
                  "apiName": "ExpectedRevenue",
                  "managedComponent": true,
                  "componentDef": {
                     "component": "gmpkg:kPICurrencyFieldLWC",
                     "attributes": {
                        "color": "red",
                        "radius": "15rem",
                        "thickness": "2rem"
                     }
                  }
               },
               {
                  "apiName": "Amount",
                  "managedComponent": true,
                  "componentDef": {
                     "component": "gmpkg:kPICurrencyFieldLWC",
                     "attributes": {
                        "color": "#78b0fd",
                        "radius": "10rem",
                        "thickness": "0.5rem"
                     }
                  }
               },
               {
                  "apiName": "Probability",
                  "managedComponent": true,
                  "componentDef": {
                     "component": "gmpkg:kPIPercentageFieldLWC",
                     "attributes": {
                        "color": "#45c65a",
                        "radius": "15rem",
                        "thickness": "2rem"
                     }
                  }
               }
            ]
         ]
      }
   ]
}
```

As you can see, KPI component is used with the [GM - Record Layout ](/package-reference/components-library/gm-record-layout.md)component.  We configured three Opportunity fields as KPI : Expected Revenue, Amount and Probability. &#x20;

As of today we support tow KPI: **Currency** and **Percentage**.

### Currency KPI

```coffeescript
{
   "apiName": "ExpectedRevenue",
   "managedComponent": true,
   "componentDef": {
      "component": "gmpkg:kPICurrencyFieldLWC",
      "attributes": {
         "color": "red",
         "radius": "15rem",
         "thickness": "2rem"
      }
   }
}
```

* **component**: gmpkg:kPICurrencyFieldLWC
* **color:**  Ring coloring (default value is #0176d3)
* **radius :** Ring size (default value is 10rem)
* **thickness**: Ring thickness (default value is 1.5rem)

### Percentage KPI

```coffeescript
{
   "apiName": "Probability",
   "managedComponent": true,
   "componentDef": {
      "component": "c:kPIPercentageFieldLWC",
      "attributes": {
         "color": "#45c65a",
         "radius": "15rem",
         "thickness": "2rem"
      }
   }
}
```

* **component**: gmpkg:kPIPercentageFieldLWC
* **color:**  Ring coloring (default value is #0176d3)
* **radius :** Ring size (default value is 10rem)
* **thickness**: Ring thickness (default value is 1.5rem)


---

# 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://docs.gridmate.io/product-tour/record-kpi.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.
