4040import com .github .mikephil .charting .utils .MPPointF ;
4141import com .github .mikephil .charting .utils .SaveUtils ;
4242import com .github .mikephil .charting .utils .Utils ;
43+ import com .github .mikephil .charting .utils .UtilsKtKt ;
4344import com .github .mikephil .charting .utils .ViewPortHandler ;
4445
4546import java .util .ArrayList ;
@@ -209,7 +210,8 @@ protected void init() {
209210
210211 // initialize the utils
211212 Utils .init (getContext ());
212- mMaxHighlightDistance = Utils .convertDpToPixel (500f );
213+ UtilsKtKt .initUtils (getContext ());
214+ mMaxHighlightDistance = UtilsKtKt .convertDpToPixel (500f );
213215
214216 mDescription = new Description ();
215217 mLegend = new Legend ();
@@ -223,7 +225,7 @@ protected void init() {
223225 mInfoPaint = new Paint (Paint .ANTI_ALIAS_FLAG );
224226 mInfoPaint .setColor (Color .rgb (247 , 189 , 51 )); // orange
225227 mInfoPaint .setTextAlign (Align .CENTER );
226- mInfoPaint .setTextSize (Utils .convertDpToPixel (12f ));
228+ mInfoPaint .setTextSize (UtilsKtKt .convertDpToPixel (12f ));
227229
228230 if (mLogEnabled ) {
229231 Log .i ("" , "Chart.init()" );
@@ -364,7 +366,7 @@ protected void setupDefaultFormatter(float min, float max) {
364366 reference = Math .abs (max - min );
365367 }
366368
367- int digits = Utils .getDecimals (reference );
369+ int digits = UtilsKtKt .getDecimals (reference );
368370
369371 // setup the formatter with a new number of digits
370372 mDefaultValueFormatter .setup (digits );
@@ -464,7 +466,7 @@ public float getMaxHighlightDistance() {
464466 * Default: 500dp
465467 */
466468 public void setMaxHighlightDistance (float distDp ) {
467- mMaxHighlightDistance = Utils .convertDpToPixel (distDp );
469+ mMaxHighlightDistance = UtilsKtKt .convertDpToPixel (distDp );
468470 }
469471
470472 /**
@@ -1031,7 +1033,7 @@ public void setExtraOffsets(float left, float top, float right, float bottom) {
10311033 * Set an extra offset to be appended to the viewport's top
10321034 */
10331035 public void setExtraTopOffset (float offset ) {
1034- mExtraTopOffset = Utils .convertDpToPixel (offset );
1036+ mExtraTopOffset = UtilsKtKt .convertDpToPixel (offset );
10351037 }
10361038
10371039 /**
@@ -1045,7 +1047,7 @@ public float getExtraTopOffset() {
10451047 * Set an extra offset to be appended to the viewport's right
10461048 */
10471049 public void setExtraRightOffset (float offset ) {
1048- mExtraRightOffset = Utils .convertDpToPixel (offset );
1050+ mExtraRightOffset = UtilsKtKt .convertDpToPixel (offset );
10491051 }
10501052
10511053 /**
@@ -1059,7 +1061,7 @@ public float getExtraRightOffset() {
10591061 * Set an extra offset to be appended to the viewport's bottom
10601062 */
10611063 public void setExtraBottomOffset (float offset ) {
1062- mExtraBottomOffset = Utils .convertDpToPixel (offset );
1064+ mExtraBottomOffset = UtilsKtKt .convertDpToPixel (offset );
10631065 }
10641066
10651067 /**
@@ -1073,7 +1075,7 @@ public float getExtraBottomOffset() {
10731075 * Set an extra offset to be appended to the viewport's left
10741076 */
10751077 public void setExtraLeftOffset (float offset ) {
1076- mExtraLeftOffset = Utils .convertDpToPixel (offset );
1078+ mExtraLeftOffset = UtilsKtKt .convertDpToPixel (offset );
10771079 }
10781080
10791081 /**
@@ -1492,7 +1494,7 @@ protected void onLayout(boolean changed, int left, int top, int right, int botto
14921494 @ Override
14931495 protected void onMeasure (int widthMeasureSpec , int heightMeasureSpec ) {
14941496 super .onMeasure (widthMeasureSpec , heightMeasureSpec );
1495- int size = (int ) Utils .convertDpToPixel (50f );
1497+ int size = (int ) UtilsKtKt .convertDpToPixel (50f );
14961498 setMeasuredDimension (Math .max (getSuggestedMinimumWidth (), resolveSize (size , widthMeasureSpec )), Math .max (getSuggestedMinimumHeight (), resolveSize (size , heightMeasureSpec )));
14971499 }
14981500
0 commit comments