# Data Types for Circular Plots

## Introduction

Unlike the data types for linear plots, we don't have any custom data types for circular plots and are using the primary pair \<T , V> to represent each data observation.&#x20;

We use the following class to create data sets for circular plots.

* List Data Strategy

## List Data Strategy

This is one of the strategies in the library to format and manipulate the data fed for the observations. It take two types of data :-&#x20;

* itemsList - This is a List \<Pair\<String , Float> where each pair represents an observation. The first element in the pair is the title of data and the second element is the actual value.
* unit - This represents the unit of the values.

### Static List Data Strategy

Data objects which are static and won't change or need any re - composition, can be created normally like any other class object creation.

*Here's an example of how to create it :-*

```kotlin
// Creating List Data Strategy
val dataSet1 = ListDataStrategy(
    itemsList = listOf(
        Pair("Google", 100f), // 1st Observation
        Pair("Amazon", 109f) // 2nd Observation
    ),
    unit = "users" // Unit
)
```

### State List Data Strategy

Data Sets that need to be remembered during re - composition can also be made and used like a mutable State data. Developers can create them for Dynamic UIs where the data plots need to be re-composed when the data changes.

*Here's an example of how to do it :-*

<pre class="language-kotlin"><code class="lang-kotlin">// Creating List Data Strategy
<strong>val dataSet1 by remember {
</strong>    mutableStateOf(
        ListDataStrategy(
            itemsList = listOf(
                Pair("Google", 100f), // 1st Observation
                Pair("Amazon", 109f) // 2nd Observation
            ),
            unit = "users" // Unit
        )
    )
}
</code></pre>

{% hint style="warning" %}
Warning:- If you are unable to create ***List Data Set*** objects properly we advise you to read through this page again before proceeding forward to create plots.

After finishing, follow the link given below and head to the circular plot section.
{% endhint %}

{% content-ref url="circular-plots" %}
[circular-plots](https://dev-anirban.gitbook.io/jetchart/plot-tool-kit/circular-plots)
{% endcontent-ref %}


---

# 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://dev-anirban.gitbook.io/jetchart/plot-tool-kit/data-types-for-circular-plots.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.
