235 lines
6.3 KiB
Java
235 lines
6.3 KiB
Java
|
package com.github.mikephil.charting.charts;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.graphics.Canvas;
|
||
|
import android.graphics.Color;
|
||
|
import android.graphics.RectF;
|
||
|
import android.util.AttributeSet;
|
||
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||
|
import o.AbstractC0810PWv;
|
||
|
import o.BKH;
|
||
|
import o.Bsv;
|
||
|
import o.C10649eKd;
|
||
|
import o.HfI;
|
||
|
import o.OFJ;
|
||
|
import o.vJN;
|
||
|
import org.bouncycastle.crypto.tls.CipherSuite;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public class RadarChart extends PieRadarChartBase<Bsv> {
|
||
|
private C10649eKd A;
|
||
|
private BKH C;
|
||
|
public int p;
|
||
|
public int s;
|
||
|
public float t;
|
||
|
public int u;
|
||
|
public OFJ v;
|
||
|
public int w;
|
||
|
private boolean x;
|
||
|
public float y;
|
||
|
|
||
|
public RadarChart(Context context) {
|
||
|
super(context);
|
||
|
this.y = 2.5f;
|
||
|
this.t = 1.5f;
|
||
|
this.w = Color.rgb(122, 122, 122);
|
||
|
this.u = Color.rgb(122, 122, 122);
|
||
|
this.p = CipherSuite.TLS_RSA_WITH_SEED_CBC_SHA;
|
||
|
this.x = true;
|
||
|
this.s = 0;
|
||
|
}
|
||
|
|
||
|
public RadarChart(Context context, AttributeSet attributeSet) {
|
||
|
super(context, attributeSet);
|
||
|
this.y = 2.5f;
|
||
|
this.t = 1.5f;
|
||
|
this.w = Color.rgb(122, 122, 122);
|
||
|
this.u = Color.rgb(122, 122, 122);
|
||
|
this.p = CipherSuite.TLS_RSA_WITH_SEED_CBC_SHA;
|
||
|
this.x = true;
|
||
|
this.s = 0;
|
||
|
}
|
||
|
|
||
|
public RadarChart(Context context, AttributeSet attributeSet, int i) {
|
||
|
super(context, attributeSet, i);
|
||
|
this.y = 2.5f;
|
||
|
this.t = 1.5f;
|
||
|
this.w = Color.rgb(122, 122, 122);
|
||
|
this.u = Color.rgb(122, 122, 122);
|
||
|
this.p = CipherSuite.TLS_RSA_WITH_SEED_CBC_SHA;
|
||
|
this.x = true;
|
||
|
this.s = 0;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
@Override // com.github.mikephil.charting.charts.PieRadarChartBase, com.github.mikephil.charting.charts.Chart
|
||
|
public final void m() {
|
||
|
super.m();
|
||
|
this.v = new OFJ(OFJ.RVV.LEFT);
|
||
|
this.y = AbstractC0810PWv.d(1.5f);
|
||
|
this.t = AbstractC0810PWv.d(0.75f);
|
||
|
this.f6461o = new HfI(this, this.d, this.r);
|
||
|
this.A = new C10649eKd(this.r, this.v, this);
|
||
|
this.C = new BKH(this.r, this.q, this);
|
||
|
this.j = new vJN(this);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
@Override // com.github.mikephil.charting.charts.PieRadarChartBase, com.github.mikephil.charting.charts.Chart
|
||
|
public final void e() {
|
||
|
float f;
|
||
|
float f2;
|
||
|
super.e();
|
||
|
OFJ ofj = this.v;
|
||
|
Bsv bsv = (Bsv) this.c;
|
||
|
if (OFJ.RVV.LEFT == OFJ.RVV.LEFT) {
|
||
|
f = bsv.d;
|
||
|
if (f == Float.MAX_VALUE) {
|
||
|
f = bsv.a;
|
||
|
}
|
||
|
} else {
|
||
|
f = bsv.a;
|
||
|
if (f == Float.MAX_VALUE) {
|
||
|
f = bsv.d;
|
||
|
}
|
||
|
}
|
||
|
Bsv bsv2 = (Bsv) this.c;
|
||
|
if (OFJ.RVV.LEFT == OFJ.RVV.LEFT) {
|
||
|
f2 = bsv2.c;
|
||
|
if (f2 == -3.4028235E38f) {
|
||
|
f2 = bsv2.e;
|
||
|
}
|
||
|
} else {
|
||
|
f2 = bsv2.e;
|
||
|
if (f2 == -3.4028235E38f) {
|
||
|
f2 = bsv2.c;
|
||
|
}
|
||
|
}
|
||
|
ofj.b(f, f2);
|
||
|
this.q.b(BitmapDescriptorFactory.HUE_RED, ((Bsv) this.c).b().r());
|
||
|
}
|
||
|
|
||
|
@Override // com.github.mikephil.charting.charts.PieRadarChartBase, com.github.mikephil.charting.charts.Chart
|
||
|
public final void o() {
|
||
|
if (this.c == 0) {
|
||
|
return;
|
||
|
}
|
||
|
e();
|
||
|
C10649eKd c10649eKd = this.A;
|
||
|
float f = this.v.c;
|
||
|
float f2 = this.v.a;
|
||
|
boolean z = this.v.C;
|
||
|
c10649eKd.c(f, f2);
|
||
|
this.C.c(this.q.c, this.q.a);
|
||
|
if (this.k != null) {
|
||
|
boolean z2 = this.k.f8385o;
|
||
|
this.m.a(this.c);
|
||
|
}
|
||
|
b();
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
@Override // com.github.mikephil.charting.charts.Chart, android.view.View
|
||
|
public void onDraw(Canvas canvas) {
|
||
|
super.onDraw(canvas);
|
||
|
if (this.c == 0) {
|
||
|
return;
|
||
|
}
|
||
|
if (this.q.q) {
|
||
|
this.C.c(this.q.c, this.q.a);
|
||
|
}
|
||
|
this.C.GX_(canvas);
|
||
|
if (this.x) {
|
||
|
this.f6461o.GS_(canvas);
|
||
|
}
|
||
|
if (this.v.q) {
|
||
|
boolean z = this.v.j;
|
||
|
}
|
||
|
this.f6461o.GR_(canvas);
|
||
|
if (s()) {
|
||
|
this.f6461o.GT_(canvas, this.g);
|
||
|
}
|
||
|
if (this.v.q) {
|
||
|
boolean z2 = this.v.j;
|
||
|
this.A.Hb_(canvas);
|
||
|
}
|
||
|
this.A.Ha_(canvas);
|
||
|
this.f6461o.GU_(canvas);
|
||
|
this.m.GJ_(canvas);
|
||
|
Gt_(canvas);
|
||
|
d();
|
||
|
}
|
||
|
|
||
|
public final float x() {
|
||
|
RectF rectF = this.r.b;
|
||
|
return Math.min(rectF.width() / 2.0f, rectF.height() / 2.0f) / this.v.d;
|
||
|
}
|
||
|
|
||
|
public final float v() {
|
||
|
return 360.0f / ((Bsv) this.c).b().r();
|
||
|
}
|
||
|
|
||
|
public void setWebLineWidth(float f) {
|
||
|
this.y = AbstractC0810PWv.d(f);
|
||
|
}
|
||
|
|
||
|
public void setWebLineWidthInner(float f) {
|
||
|
this.t = AbstractC0810PWv.d(f);
|
||
|
}
|
||
|
|
||
|
public void setSkipWebLineCount(int i) {
|
||
|
this.s = Math.max(0, i);
|
||
|
}
|
||
|
|
||
|
@Override // com.github.mikephil.charting.charts.PieRadarChartBase
|
||
|
protected final float r() {
|
||
|
return this.m.d.getTextSize() * 4.0f;
|
||
|
}
|
||
|
|
||
|
@Override // com.github.mikephil.charting.charts.PieRadarChartBase
|
||
|
protected final float q() {
|
||
|
if (this.q.q && this.q.h) {
|
||
|
return this.q.B;
|
||
|
}
|
||
|
return AbstractC0810PWv.d(10.0f);
|
||
|
}
|
||
|
|
||
|
@Override // com.github.mikephil.charting.charts.PieRadarChartBase
|
||
|
public final float p() {
|
||
|
RectF rectF = this.r.b;
|
||
|
return Math.min(rectF.width() / 2.0f, rectF.height() / 2.0f);
|
||
|
}
|
||
|
|
||
|
@Override // com.github.mikephil.charting.charts.PieRadarChartBase
|
||
|
public final int c(float f) {
|
||
|
float c = AbstractC0810PWv.c(f - this.H);
|
||
|
float r = 360.0f / ((Bsv) this.c).b().r();
|
||
|
int r2 = ((Bsv) this.c).b().r();
|
||
|
int i = 0;
|
||
|
while (i < r2) {
|
||
|
int i2 = i + 1;
|
||
|
if ((i2 * r) - (r / 2.0f) > c) {
|
||
|
return i;
|
||
|
}
|
||
|
i = i2;
|
||
|
}
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
public void setWebColorInner(int i) {
|
||
|
this.u = i;
|
||
|
}
|
||
|
|
||
|
public void setWebColor(int i) {
|
||
|
this.w = i;
|
||
|
}
|
||
|
|
||
|
public void setWebAlpha(int i) {
|
||
|
this.p = i;
|
||
|
}
|
||
|
|
||
|
public void setDrawWeb(boolean z) {
|
||
|
this.x = z;
|
||
|
}
|
||
|
}
|