Skip to content

Commit a78ded6

Browse files
committed
Cosmetic
1 parent 4ba838c commit a78ded6

File tree

1 file changed

+15
-13
lines changed
  • MPChartLib/src/main/java/com/github/mikephil/charting/renderer

1 file changed

+15
-13
lines changed

MPChartLib/src/main/java/com/github/mikephil/charting/renderer/AxisRenderer.kt

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,21 @@ abstract class AxisRenderer(
7575
init {
7676
paintAxisLabels = Paint(Paint.ANTI_ALIAS_FLAG)
7777

78-
paintGrid = Paint()
79-
paintGrid!!.color = Color.GRAY
80-
paintGrid!!.strokeWidth = 1f
81-
paintGrid!!.style = Paint.Style.STROKE
82-
paintGrid!!.alpha = 90
83-
84-
paintAxisLine = Paint()
85-
paintAxisLine!!.color = Color.BLACK
86-
paintAxisLine!!.strokeWidth = 1f
87-
paintAxisLine!!.style = Paint.Style.STROKE
88-
89-
limitLinePaint = Paint(Paint.ANTI_ALIAS_FLAG)
90-
limitLinePaint!!.style = Paint.Style.STROKE
78+
paintGrid = Paint().apply {
79+
color = Color.GRAY
80+
strokeWidth = 1f
81+
style = Paint.Style.STROKE
82+
alpha = 90
83+
}
84+
85+
paintAxisLine = Paint().apply {
86+
color = Color.BLACK
87+
strokeWidth = 1f
88+
style = Paint.Style.STROKE
89+
}
90+
limitLinePaint = Paint(Paint.ANTI_ALIAS_FLAG).apply {
91+
style = Paint.Style.STROKE
92+
}
9193
}
9294

9395
/**

0 commit comments

Comments
 (0)