# String Label Line Plot

## Introduction

A normal line plot, also called a dot plot, is a graph that shows the frequency, or the number of times, a value occurs in a data set. Line plots are constructed with each value recorded along the horizontal axis, also called the x-axis.

A **string label line plot** is created when we use custom string labels for the Y Axis instead of the ones calculated internally by the library.

&#x20;Also, multiple data sets can be passed through the function to create double/multiple line charts.

<div><figure><img src="/files/KJDrUYlw7SmtyT8zIMXu" alt=""><figcaption><p>One Linear Data Set Object</p></figcaption></figure> <figure><img src="/files/J0m4dJWWw52O9njjmpem" alt=""><figcaption><p>Two Linear Data Set Object</p></figcaption></figure></div>

<div><figure><img src="/files/LFQbPTW1oo4m3wv53A2q" alt=""><figcaption><p>Three Linear Data Set Object</p></figcaption></figure> <figure><img src="/files/ST31xLbIldchTVpNi6Od" alt=""><figcaption><p>Four Linear Data Set Object</p></figcaption></figure></div>

## Code Example

According to the number of Linear Data Sets in the list, the plot shows the plotted lines for all the data sets respectively.

If you provide a single linear data set, only **one line plot** is created. Similarly, if you provide two coordinate sets then **two line plots** will be created and so on.

*Example of a line plot with a list of linear data set objects :-*&#x20;

```kotlin
// X Axis Labels Example
val xAxisLabels = listOf("Jan" , "Feb" , "Mar").toCoordinateSet()

// y Axis Labels Example
val yAxisLabels = mutableListOf(
    Coordinate("Worst"),
    Coordinate("Bad"),
    Coordinate("Average"),
    Coordinate("Good"),
    Coordinate("Excellent")
)

// This function draws the String Line Plot
BasicLinearStrategy.LinePlot(
    linearData = BasicDataStrategy(
        linearDataSets = linearDataSet1, // List<LinearDataSet>
        xAxisLabels = xAxisLabels,
        yAxisLabels = yAxisLabels.toMutableList()
    )
)
```

{% hint style="info" %}
Note :- In custom label system the data values are mapped to the index values of the custom label.

For example, in above code, if the value in the data set is ***0***,  its point will be plotted along the *Worst **label*** in the Y - axis.
{% endhint %}


---

# 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/linear-plots/string-label-line-plot.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.
