@@ -64,6 +64,9 @@ public void drawData(Canvas c) {
6464
6565 protected void drawDataSet (Canvas c , IRadarDataSet dataSet ) {
6666
67+ float phaseX = mAnimator .getPhaseX ();
68+ float phaseY = mAnimator .getPhaseY ();
69+
6770 float sliceangle = mChart .getSliceAngle ();
6871
6972 // calculate the factor that is needed for transforming the value to
@@ -82,8 +85,10 @@ protected void drawDataSet(Canvas c, IRadarDataSet dataSet) {
8285
8386 Entry e = dataSet .getEntryForIndex (j );
8487
85- PointF p = Utils .getPosition (center , (e .getVal () - mChart .getYChartMin ()) * factor ,
86- sliceangle * j + mChart .getRotationAngle ());
88+ PointF p = Utils .getPosition (
89+ center ,
90+ (e .getVal () - mChart .getYChartMin ()) * factor * phaseY ,
91+ sliceangle * j * phaseX + mChart .getRotationAngle ());
8792
8893 if (Float .isNaN (p .x ))
8994 continue ;
@@ -125,6 +130,9 @@ protected void drawDataSet(Canvas c, IRadarDataSet dataSet) {
125130 @ Override
126131 public void drawValues (Canvas c ) {
127132
133+ float phaseX = mAnimator .getPhaseX ();
134+ float phaseY = mAnimator .getPhaseY ();
135+
128136 float sliceangle = mChart .getSliceAngle ();
129137
130138 // calculate the factor that is needed for transforming the value to
@@ -149,8 +157,10 @@ public void drawValues(Canvas c) {
149157
150158 Entry entry = dataSet .getEntryForIndex (j );
151159
152- PointF p = Utils .getPosition (center , (entry .getVal () - mChart .getYChartMin ()) * factor ,
153- sliceangle * j + mChart .getRotationAngle ());
160+ PointF p = Utils .getPosition (
161+ center ,
162+ (entry .getVal () - mChart .getYChartMin ()) * factor * phaseY ,
163+ sliceangle * j * phaseX + mChart .getRotationAngle ());
154164
155165 drawValue (c , dataSet .getValueFormatter (), entry .getVal (), entry , i , p .x , p .y - yoffset );
156166 }
@@ -182,8 +192,10 @@ protected void drawWeb(Canvas c) {
182192
183193 for (int i = 0 ; i < mChart .getData ().getXValCount (); i += xIncrements ) {
184194
185- PointF p = Utils .getPosition (center , mChart .getYRange () * factor , sliceangle * i
186- + rotationangle );
195+ PointF p = Utils .getPosition (
196+ center ,
197+ mChart .getYRange () * factor ,
198+ sliceangle * i + rotationangle );
187199
188200 c .drawLine (center .x , center .y , p .x , p .y , mWebPaint );
189201 }
@@ -212,6 +224,9 @@ protected void drawWeb(Canvas c) {
212224 @ Override
213225 public void drawHighlighted (Canvas c , Highlight [] indices ) {
214226
227+ float phaseX = mAnimator .getPhaseX ();
228+ float phaseY = mAnimator .getPhaseY ();
229+
215230 float sliceangle = mChart .getSliceAngle ();
216231 float factor = mChart .getFactor ();
217232
@@ -239,8 +254,10 @@ public void drawHighlighted(Canvas c, Highlight[] indices) {
239254 if (Float .isNaN (y ))
240255 continue ;
241256
242- PointF p = Utils .getPosition (center , y * factor ,
243- sliceangle * j + mChart .getRotationAngle ());
257+ PointF p = Utils .getPosition (
258+ center ,
259+ y * factor * phaseY ,
260+ sliceangle * j * phaseX + mChart .getRotationAngle ());
244261
245262 float [] pts = new float []{
246263 p .x , p .y
0 commit comments