File tree Expand file tree Collapse file tree
src/com/github/mikephil/charting/charts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77 <uses-sdk
88 android : minSdkVersion =" 8"
9- android : targetSdkVersion =" 21 " />
9+ android : targetSdkVersion =" 22 " />
1010 <uses-permission android : name =" android.permission.WRITE_EXTERNAL_STORAGE" />
1111
1212 <application
1313 android : allowBackup =" true"
1414 android : hardwareAccelerated =" true"
15- android : icon =" @drawable/ic_launcher"
15+ android : icon =" @drawable/ic_launcher"
1616 android : label =" @string/app_name"
1717 android : theme =" @style/AppTheme" >
1818 <activity
Original file line number Diff line number Diff line change 1111# proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
1212
1313# Project target.
14- target =android-19
14+ target =android-22
1515android.library.reference.1 =../MPChartLib
Original file line number Diff line number Diff line change 1111# proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
1212
1313# Project target.
14- target =android-20
14+ target =android-22
1515android.library =true
Original file line number Diff line number Diff line change @@ -174,7 +174,8 @@ protected void onDraw(Canvas canvas) {
174174 if (mDataNotSet )
175175 return ;
176176
177- long starttime = System .currentTimeMillis ();calcModulus ();
177+ long starttime = System .currentTimeMillis ();
178+ calcModulus ();
178179
179180 mXAxisRenderer .calcXBounds (this , mXAxis .mAxisLabelModulus );
180181 mRenderer .calcXBounds (this , mXAxis .mAxisLabelModulus );
@@ -1191,14 +1192,20 @@ public int getHighestVisibleXIndex() {
11911192 * returns the current x-scale factor
11921193 */
11931194 public float getScaleX () {
1194- return mViewPortHandler .getScaleX ();
1195+ if (mViewPortHandler == null )
1196+ return 1f ;
1197+ else
1198+ return mViewPortHandler .getScaleX ();
11951199 }
11961200
11971201 /**
11981202 * returns the current y-scale factor
11991203 */
12001204 public float getScaleY () {
1201- return mViewPortHandler .getScaleY ();
1205+ if (mViewPortHandler == null )
1206+ return 1f ;
1207+ else
1208+ return mViewPortHandler .getScaleY ();
12021209 }
12031210
12041211 /**
You can’t perform that action at this time.
0 commit comments