@@ -60,6 +60,7 @@ protected void onCreate(Bundle savedInstanceState) {
6060 mSeekBarX .setOnSeekBarChangeListener (this );
6161
6262 mChart = (LineChart ) findViewById (R .id .chart1 );
63+ mChart .setLogEnabled (true );
6364
6465 // no description text
6566 mChart .setDescription ("" );
@@ -84,8 +85,7 @@ protected void onCreate(Bundle savedInstanceState) {
8485
8586 // add data
8687 setData (20 , 30 );
87-
88- mChart .animateX (2500 );
88+ mChart .invalidate ();
8989
9090 Typeface tf = Typeface .createFromAsset (getAssets (), "OpenSans-Regular.ttf" );
9191
@@ -109,8 +109,8 @@ protected void onCreate(Bundle savedInstanceState) {
109109 xAxis .setSpaceBetweenLabels (1 );
110110
111111 // custom x-axis min / max
112- xAxis .setAxisMinValue (curTime );
113- xAxis .setAxisMaxValue (curTime + 100000 );
112+ xAxis .setAxisMinValue (5000 );
113+ xAxis .setAxisMaxValue (30000 );
114114
115115 YAxis leftAxis = mChart .getAxisLeft ();
116116 leftAxis .setTypeface (tf );
@@ -272,10 +272,10 @@ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
272272 private void setData (int count , float range ) {
273273
274274 ArrayList <XAxisValue > xVals = new ArrayList <XAxisValue >();
275- for (int i = 0 ; i < count ; i ++) {
275+ for (int i = 0 ; i < 10 ; i ++) {
276276
277- long timeLong = curTime + i * 1000 ;
278- xVals .add (new XAxisValue (timeLong , new Date ( timeLong ). toString () ));
277+ long timeLong = 10000 + i * 1000 ;
278+ xVals .add (new XAxisValue (timeLong , i + "" ));
279279 }
280280
281281 ArrayList <Entry > yVals1 = new ArrayList <Entry >();
0 commit comments