How to add tiny charts in TableView

I’m relatively new to android and want to know how they add very tiny line charts in table view controls. For example, as shown below:

enter image description here

I have tried this so far: implementation ‘com.github.PhilJay:MPAndroidChart:v3.1.0’

final LineChart chart=new LineChart(this);
LineData lineData;
chart.setLayoutParams(new TableRow.LayoutParams(100, 100, 1f));
List<Entry> entryList = new ArrayList<>();
entryList.add(new Entry(10,20));
entryList.add(new Entry(5,10));
entryList.add(new Entry(7,31));
entryList.add(new Entry(3,14));
LineDataSet lineDataSet = new LineDataSet(entryList,"country");
lineData = new LineData(lineDataSet);

But it does not show in LinearLayout

Layout without chart:

enter image description here

And result with when I add Chart into LinearLayout: Runnable() {
    public void run() {

enter image description here


SOF is getting useless in terms of getting any help. Good luck posting any question and getting an answer within a week. Unless the question is ‘What is the name of the new president of USA?

About the answer:

After days of fishing, I ended up using ListView with an adapter (As I’m new with android, I didn’t know about it.) and SparkView ( which perfectly draws the Line Graph how I wanted.