Skip to content

Commit 39a9d2e

Browse files
committed
Fixed issue concerning elevation (issue PhilJay#492, PhilJay#512).
1 parent a34e52c commit 39a9d2e

5 files changed

Lines changed: 14 additions & 7 deletions

File tree

MPChartExample/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
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

MPChartExample/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
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
1515
android.library.reference.1=../MPChartLib

MPChartLib/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
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
1515
android.library=true

MPChartLib/src/com/github/mikephil/charting/charts/BarLineChartBase.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff 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
/**
-144 Bytes
Loading

0 commit comments

Comments
 (0)