Skip to content

Commit 463040a

Browse files
committed
Cosmetic
1 parent 4e8c93c commit 463040a

File tree

1 file changed

+55
-53
lines changed
  • MPChartLib/src/main/java/com/github/mikephil/charting/charts

1 file changed

+55
-53
lines changed

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

Lines changed: 55 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package com.github.mikephil.charting.charts;
22

3-
import android.animation.ValueAnimator;
4-
import android.animation.ValueAnimator.AnimatorUpdateListener;
53
import android.content.Context;
64
import android.graphics.Bitmap;
75
import android.graphics.Canvas;
@@ -167,12 +165,12 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
167165
*/
168166
private float mExtraTopOffset = 0.f, mExtraRightOffset = 0.f, mExtraBottomOffset = 0.f, mExtraLeftOffset = 0.f;
169167

170-
/**
171-
* Additional data on top of dynamically generated description. This can be set by the user.
172-
*/
173-
private String accessibilitySummaryDescription = "";
168+
/**
169+
* Additional data on top of dynamically generated description. This can be set by the user.
170+
*/
171+
private String accessibilitySummaryDescription = "";
174172

175-
/**
173+
/**
176174
* default constructor for initialization in code
177175
*/
178176
public Chart(Context context) {
@@ -228,11 +226,12 @@ protected void init() {
228226
mInfoPaint.setTextSize(Utils.convertDpToPixel(12f));
229227

230228
if (mLogEnabled) {
231-
Log.i("", "Chart.init()");
229+
Log.i("", "Chart.init()");
232230

233-
// enable being detected by ScreenReader
234-
setFocusable(true);
235-
}}
231+
// enable being detected by ScreenReader
232+
setFocusable(true);
233+
}
234+
}
236235

237236
// public void initWithDummyData() {
238237
// ColorTemplate template = new ColorTemplate();
@@ -530,16 +529,19 @@ public void highlightValues(Highlight[] highs) {
530529
}
531530

532531
public void highlightValues(List<Highlight> highs, List<IMarker> markers) {
533-
if (highs.size() != markers.size()) throw new IllegalArgumentException("Markers and highs must be mutually corresponding. High size = " + highs.size() + " Markers size = " + markers.size());
534-
setMarkers(markers);
535-
highlightValues(highs.toArray(new Highlight[0]));
536-
}
537-
538-
/**
539-
* Highlights any y-value at the given x-value in the given DataSet.
540-
* Provide -1 as the dataSetIndex to undo all highlighting.
541-
* This method will call the listener.
542-
** @param x The x-value to highlight
532+
if (highs.size() != markers.size()) {
533+
throw new IllegalArgumentException("Markers and highs must be mutually corresponding. High size = " + highs.size() + " Markers size = " + markers.size());
534+
}
535+
setMarkers(markers);
536+
highlightValues(highs.toArray(new Highlight[0]));
537+
}
538+
539+
/**
540+
* Highlights any y-value at the given x-value in the given DataSet.
541+
* Provide -1 as the dataSetIndex to undo all highlighting.
542+
* This method will call the listener.
543+
* * @param x The x-value to highlight
544+
*
543545
* @param dataSetIndex The dataset index to search in
544546
* @param dataIndex The data index to search in (only used in CombinedChartView currently)
545547
*/
@@ -1134,18 +1136,18 @@ public void setTouchEnabled(boolean enabled) {
11341136
}
11351137

11361138
public void setMarkers(List<IMarker> marker) {
1137-
mMarkers = marker;
1138-
}
1139+
mMarkers = marker;
1140+
}
11391141

1140-
/**
1141-
* sets the marker that is displayed when a value is clicked on the chart
1142-
*/
1142+
/**
1143+
* sets the marker that is displayed when a value is clicked on the chart
1144+
*/
11431145
public void setMarker(IMarker marker) {
11441146
setMarkers(Collections.singletonList(marker));
1145-
}
1146-
/**
1147-
* returns the marker that is set as a marker view for the chart
1147+
}
11481148

1149+
/**
1150+
* returns the marker that is set as a marker view for the chart
11491151
*/
11501152
public List<IMarker> getMarker() {
11511153
return mMarkers;
@@ -1580,37 +1582,37 @@ public void setUnbindEnabled(boolean enabled) {
15801582
this.mUnbind = enabled;
15811583
}
15821584

1583-
// region accessibility
1585+
// region accessibility
15841586

1585-
/**
1586-
*
1587-
* @return accessibility description must be created for each chart
1588-
*/
1589-
public abstract String getAccessibilityDescription();
1587+
/**
1588+
*
1589+
* @return accessibility description must be created for each chart
1590+
*/
1591+
public abstract String getAccessibilityDescription();
15901592

1591-
public String getAccessibilitySummaryDescription() {
1592-
return accessibilitySummaryDescription;
1593-
}
1593+
public String getAccessibilitySummaryDescription() {
1594+
return accessibilitySummaryDescription;
1595+
}
15941596

1595-
public void setAccessibilitySummaryDescription(String accessibilitySummaryDescription) {
1596-
this.accessibilitySummaryDescription = accessibilitySummaryDescription;
1597-
}
1597+
public void setAccessibilitySummaryDescription(String accessibilitySummaryDescription) {
1598+
this.accessibilitySummaryDescription = accessibilitySummaryDescription;
1599+
}
15981600

1599-
@Override
1600-
public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
1601+
@Override
1602+
public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
16011603

1602-
boolean completed = super.dispatchPopulateAccessibilityEvent(event);
1603-
Log.d(LOG_TAG, "Dispatch called for Chart <View> and completed as " + completed);
1604+
boolean completed = super.dispatchPopulateAccessibilityEvent(event);
1605+
Log.d(LOG_TAG, "Dispatch called for Chart <View> and completed as " + completed);
16041606

1605-
event.getText().add(getAccessibilityDescription());
1607+
event.getText().add(getAccessibilityDescription());
16061608

1607-
// Add the user generated summary after the dynamic summary is complete.
1608-
if (!TextUtils.isEmpty(this.getAccessibilitySummaryDescription())) {
1609-
event.getText().add(this.getAccessibilitySummaryDescription());
1610-
}
1609+
// Add the user generated summary after the dynamic summary is complete.
1610+
if (!TextUtils.isEmpty(this.getAccessibilitySummaryDescription())) {
1611+
event.getText().add(this.getAccessibilitySummaryDescription());
1612+
}
16111613

1612-
return true;
1613-
}
1614+
return true;
1615+
}
16141616

1615-
// endregion
1617+
// endregion
16161618
}

0 commit comments

Comments
 (0)