# Analytics KPI

![SmartAdmin Analytics KPI](https://2127362724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fuw1ZAR95MQj94arOTn3w%2Fuploads%2FqIgBd2IndVH3IzvSpqGH%2Fimage.png?alt=media\&token=f714452b-0aae-49bd-aefa-5704b263c87d)

The [SmartAdmin Analytics KPI](https://www.gotbootstrap.com/themes/smartadmin/4.5.1/intel_analytics_dashboard.html) component is native to the SmartAdmin theme.  The component uses a sparkline trend next to a metric and associated label. &#x20;

## Library <a href="#library" id="library"></a>

The Analytics KPI component is located in the SmartAdmin for WireBootstrap library file located at `\lib\smart-admin`.

## Class <a href="#class" id="class"></a>

The Analytics KPI extends the [wire.ui.component](https://docs.wirebootstrap.com/wirebootstrap/reference/wire.ui/wire.ui.component) class. As such, it inherits all the base functionality of that class.

To create a new instance of the Analytics KPI component, use the `wire.smartAdmin.kpiCount` class.

```
const kpi = wire.smartAdmin.kpiAnalytics();
```

## Example <a href="#example" id="example"></a>

An example that demonstrates the Analytics KPI component can be found in the SmartAdmin for WireBootstrap project at `\pages\kpis-analytics.html`.


---

# 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.wirebootstrap.com/smart-admin/components/analytics-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.
