πŸ“ŠBar Plot

Introduction

This is a normal bar plot that is drawn according to the linear data sets provided in the input of the functions. We can have both custom string labels and library-calculated labels in this type of plot.

Bar Plot
String Bar Plot

Code Example

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

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

Example of a bar plot with a list of linear data set objects :-

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

// This function creates the Bar Plot.
BasicLinearStrategy.BarPlot(
    linearData = BasicDataStrategy(
        linearDataSets = linearDataSet1,
        xAxisLabels = xAxisLabels
    )
)

You can also have custom string labels in bar plots. For more information on how you can implement them, head over to the page linked below.

πŸ“ˆString Label Line Plot

Last updated

Was this helpful?