File tree 2 files changed +7
-3
lines changed
MPChartLib/src/main/java/com/github/mikephil/charting 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -809,12 +809,13 @@ public String getAccessibilityDescription() {
809
809
810
810
PieData pieData = getData ();
811
811
812
- int entryCount = pieData .getEntryCount ();
812
+ int entryCount = 0 ;
813
+ if (pieData != null )
814
+ entryCount = pieData .getEntryCount ();
813
815
814
816
StringBuilder builder = new StringBuilder ();
815
817
816
- builder .append (String .format (Locale .getDefault (), "The pie chart has %d entries." ,
817
- entryCount ));
818
+ builder .append (String .format (Locale .getDefault (), "The pie chart has %d entries." , entryCount ));
818
819
819
820
for (int i = 0 ; i < entryCount ; i ++) {
820
821
PieEntry entry = pieData .getDataSet ().getEntryForIndex (i );
Original file line number Diff line number Diff line change 6
6
import com .github .mikephil .charting .formatter .IValueFormatter ;
7
7
import com .github .mikephil .charting .utils .MPPointF ;
8
8
9
+ import androidx .annotation .Nullable ;
10
+
9
11
/**
10
12
* Interface that provides everything there is to know about the dimensions,
11
13
* bounds, and range of the chart.
@@ -63,6 +65,7 @@ public interface ChartInterface {
63
65
64
66
IValueFormatter getDefaultValueFormatter ();
65
67
68
+ @ Nullable
66
69
ChartData getData ();
67
70
68
71
int getMaxVisibleCount ();
You can’t perform that action at this time.
0 commit comments