> For the complete documentation index, see [llms.txt](https://docs.xviz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xviz.com/performance-management/display-data-in-the-cards/sparkline-trends.md).

# Sparkline Trends

In addition to showing the KPIs and Variance to a benchmark, we can also visualize the trend of a KPI.

Insert a Category in the ‘Sparkline’ data field which will be the X-axis:<br>

<figure><img src="/files/VONwgC3asy5nMmZnmkdT" alt=""><figcaption></figcaption></figure>

Let’s also add a third metric for Employee Performance in the ‘Values’ data field:<br>

<figure><img src="/files/WgIfubBKCMGtASBNrwEq" alt=""><figcaption></figcaption></figure>

By default, all the measures in the ‘Values’ field will be plotted in the Sparkline:

<figure><img src="/files/xxhviQdbHTXGwPCaeA2V" alt=""><figcaption></figcaption></figure>

We can select the measures to be used in the Sparkline using the Sparkline ‘Settings’ in the top ribbon menu:

<figure><img src="/files/CK8sWJpjKeVU2bpt5nW5" alt=""><figcaption></figcaption></figure>

For our example, let’s plot only ‘Performance Score’ in the Sparkline as shown in the above settings. The visual now looks as shown below:<br>

<figure><img src="/files/nZ0iY7sqqIp7MaSP5FlZ" alt=""><figcaption></figcaption></figure>

We can also change the ‘Chart Type’ to change the line chart of the sparkline to an alternate visualization:

<figure><img src="/files/YRH8qoLmRNfuIspOo8l8" alt=""><figcaption></figcaption></figure>

Additional configurations for the sparkline are provided here:<br>

<figure><img src="/files/cHHysJJOXBxmNMaWfTFF" alt=""><figcaption></figcaption></figure>

For our example, we have set the Chart Type to Area Chart. And enabled Marker for all datapoints.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.xviz.com/performance-management/display-data-in-the-cards/sparkline-trends.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
