Skip to content

Commit 7aeb89f

Browse files
committed
Utils restructure
1 parent 09da0c9 commit 7aeb89f

File tree

11 files changed

+71
-106
lines changed

11 files changed

+71
-106
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
import com.github.mikephil.charting.utils.Transformer;
3737
import com.github.mikephil.charting.utils.Utils;
3838

39+
import androidx.annotation.NonNull;
40+
3941
/**
4042
* Base-class of LineChart, BarChart, ScatterChart and CandleStickChart.
4143
*
@@ -191,7 +193,7 @@ protected void init() {
191193
private long drawCycles = 0;
192194

193195
@Override
194-
protected void onDraw(Canvas canvas) {
196+
protected void onDraw(@NonNull Canvas canvas) {
195197
super.onDraw(canvas);
196198

197199
if (mData == null)
@@ -465,7 +467,7 @@ protected void calculateLegendOffsets(RectF offsets) {
465467
}
466468
}
467469

468-
private RectF mOffsetsBuffer = new RectF();
470+
private final RectF mOffsetsBuffer = new RectF();
469471

470472
@Override
471473
public void calculateOffsets() {

MPChartLib/src/main/java/com/github/mikephil/charting/charts/Chart.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
import java.util.Collections;
4949
import java.util.List;
5050

51+
import androidx.annotation.NonNull;
52+
5153
/**
5254
* Baseclass of all Chart-Views.
5355
*
@@ -375,7 +377,7 @@ protected void setupDefaultFormatter(float min, float max) {
375377
private boolean mOffsetsCalculated = false;
376378

377379
@Override
378-
protected void onDraw(Canvas canvas) {
380+
protected void onDraw(@NonNull Canvas canvas) {
379381
// super.onDraw(canvas);
380382

381383
if (mData == null) {

0 commit comments

Comments
 (0)