title: How to use two sets of data for drawing graph using MPAndroidChart in Android
body: <p>I was trying to use two sets of data while using <a href="https://github.com/PhilJay/MPAndroidChart" rel="nofollow noreferrer">MPAndroidChart</a> </p>
  
  <pre><code>val values1 = ArrayList&lt;Entry&gt;()
  values1.add(Entry(3f,2f))
  values1.add(Entry(3.5f,4f))
  values1.add(Entry(4f,3f))
  val values = ArrayList&lt;Entry&gt;()
  values.add(Entry(3f,2f))
  values.add(Entry(3.5f,4f))
  values.add(Entry(4f,3f))
  values.add(Entry(4.5f,6f))
  values.add(Entry(5f,10f))
  values.add(Entry(5.5f,4f))
  values.add(Entry(6f,3f))
  </code></pre>
  
  <p>And drawing the Line graph </p>
  
  <pre><code>var set1:LineDataSet
  var set2:LineDataSet
  set1 = LineDataSet(values, "DataSet 1")
  set2 = LineDataSet(values1, "DataSet 2")
  
  set1.mode = LineDataSet.Mode.CUBIC_BEZIER
  set1.cubicIntensity = 0.2f
  set1.setDrawFilled(true)
  set1.setDrawCircles(false)
  set1.lineWidth = 1.8f
  set1.color = ContextCompat.getColor(activity!!, R.color.colorAccent)
  set1.fillColor = ContextCompat.getColor(activity!!, R.color.colorAccent)
  set1.fillAlpha = 100
  set1.setDrawHorizontalHighlightIndicator(false)
  //set1.setFillFormatter { dataSet, dataProvider -&gt; chart.axisLeft.minWidth }
  
  set2.mode = LineDataSet.Mode.CUBIC_BEZIER
  set2.cubicIntensity = 0.2f
  set2.setDrawFilled(true)
  set2.setDrawCircles(false)
  set2.lineWidth = 1.8f
  set2.color = ContextCompat.getColor(activity!!, R.color.colorPrimary)
  set2.fillColor = ContextCompat.getColor(activity!!, R.color.colorPrimary)
  set2.fillAlpha = 100
  set2.setDrawHorizontalHighlightIndicator(false)
  //set2.setFillFormatter { dataSet, dataProvider -&gt; chart.axisLeft.zeroLineWidth }
  
  // create a data object with the data sets
  val list= mutableListOf&lt;LineDataSet&gt;()
  list.add(set1)
  list.add(set2)
  val data = LineData(list as List&lt;ILineDataSet&gt;?)
  data.setValueTextSize(9f)
  data.setDrawValues(false)
  
  // set data
  chart.data = data
  </code></pre>
  
  <p>The outcome is like this
  <a href="https://i.stack.imgur.com/bZbD5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bZbD5.png" alt="enter image description here"></a></p>
  
  <p>I just want to improve or smooth the graph of set2 [arrow marked] so that the line exactly overlaps the set1 and hide that part of data.</p>