πŸ“ˆNormal 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.

We use the Linear Data Set input to create a basic line plot, with the plot Y - Axis labels calculated by the library.

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

One Linear Data Set object
Two Linear Data Set objects
Three Linear Data Set Object
Four Linear Data Set Object

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 :-

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

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

Last updated

Was this helpful?