44import android .os .Bundle ;
55import android .view .Menu ;
66import android .view .MenuItem ;
7+ import android .view .WindowManager ;
78import android .widget .SeekBar ;
89import android .widget .SeekBar .OnSeekBarChangeListener ;
910import android .widget .TextView ;
1011
1112import com .github .mikephil .charting .Chart ;
13+ import com .github .mikephil .charting .ColorTemplate ;
1214import com .github .mikephil .charting .LineChart ;
1315
1416import java .util .ArrayList ;
@@ -22,6 +24,8 @@ public class LineChartActivity extends Activity implements OnSeekBarChangeListen
2224 @ Override
2325 protected void onCreate (Bundle savedInstanceState ) {
2426 super .onCreate (savedInstanceState );
27+ getWindow ().setFlags (WindowManager .LayoutParams .FLAG_FULLSCREEN ,
28+ WindowManager .LayoutParams .FLAG_FULLSCREEN );
2529 setContentView (R .layout .activity_linechart );
2630
2731 tvX = (TextView ) findViewById (R .id .tvXMax );
@@ -35,13 +39,17 @@ protected void onCreate(Bundle savedInstanceState) {
3539 mSeekBarY .setOnSeekBarChangeListener (this );
3640
3741 mChart = (LineChart ) findViewById (R .id .chart1 );
42+ // mChart.setColorTemplate(new ColorTemplate(ColorTemplate.getColors(this, ColorTemplate.LIBERTY_COLORS)));
43+
3844// mChart.setDrawFilled(true);
3945// mChart.setRoundedYLegend(false);
4046// mChart.setStartAtZero(true);
4147 mChart .setDrawValues (false );
48+ mChart .setLineWidth (5f );
49+ mChart .setCircleSize (5f );
4250 mChart .setDrawAdditional (true );
4351// mChart.setSpacePercent(20, 10);
44- // mChart.setYLegendCount(10 );
52+ mChart .setYLegendCount (5 );
4553 mChart .setTouchEnabled (true );
4654
4755 ArrayList <String > xVals = new ArrayList <String >();
@@ -136,7 +144,7 @@ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
136144
137145 ArrayList <String > xVals = new ArrayList <String >();
138146 for (int i = 1 ; i <= mSeekBarX .getProgress ()+1 ; i ++) {
139- xVals .add ((i - 1 )+"a " );
147+ xVals .add ((i - 1 )+"" );
140148 }
141149
142150 ArrayList <Float > yVals = new ArrayList <Float >();
0 commit comments