Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>for dynamic plots use GraphicalView rather then intent::</p> <pre><code> public GraphicalView mChartView; </code></pre> <p>creat a xml::</p> <pre><code>&lt;RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;LinearLayout android:id="@+id/graph" android:layout_width="fill_parent" android:layout_height="145dip" &gt; &lt;/LinearLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p>then in ur code :</p> <pre><code> LinearLayout layout = (LinearLayout) findViewById(R.id.graph); mChartView = ChartFactory.mChartView = ChartFactory.getLineChartView(getBaseContext(), dataset, renderer) layout.addView(mChartView); </code></pre> <ul> <li><p>After entering values you read from edit text fields right: </p></li> <li><p>then you are passing the new values to add in respective arraylists</p></li> <li><p>then you should call the code for linegraph again after adding new values and remember to clear series before reading arraylists (ie. <code>dataset.clear();</code>) ie. when line code function starts at beginning add dataset.clear(); because if u dont clear data will overlap and may through exception or line may look thick at old data ...</p></li> </ul> <p>then call <code>mChartView.repaint();</code> to refresh graph</p> <p><strong>these links too ll help u <a href="https://stackoverflow.com/questions/10630898/how-to-draw-a-line-dynamically-in-android?rq=1">link1</a> <a href="https://stackoverflow.com/questions/7955411/dynamically-draw-lines-between-multiple-geopoints-in-android-mapview">link2</a></strong></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload