4141public class CombinedChartActivity extends DemoBase {
4242
4343 private CombinedChart chart ;
44- private final int count = 12 ;
44+ private final int sampleCount = 12 ;
4545
4646 @ Override
4747 protected void onCreate (Bundle savedInstanceState ) {
@@ -111,7 +111,7 @@ private LineData generateLineData() {
111111
112112 ArrayList <Entry > entries = new ArrayList <>();
113113
114- for (int index = 0 ; index < count ; index ++)
114+ for (int index = 0 ; index < sampleCount ; index ++)
115115 entries .add (new Entry (index + 0.5f , getRandom (15 , 5 )));
116116
117117 LineDataSet set = new LineDataSet (entries , "Line DataSet" );
@@ -136,7 +136,7 @@ private BarData generateBarData() {
136136 ArrayList <BarEntry > entries1 = new ArrayList <>();
137137 ArrayList <BarEntry > entries2 = new ArrayList <>();
138138
139- for (int index = 0 ; index < count ; index ++) {
139+ for (int index = 0 ; index < sampleCount ; index ++) {
140140 entries1 .add (new BarEntry (0 , getRandom (25 , 25 )));
141141
142142 // stacked
@@ -176,7 +176,7 @@ private ScatterData generateScatterData() {
176176
177177 ArrayList <Entry > entries = new ArrayList <>();
178178
179- for (float index = 0 ; index < count ; index += 0.5f )
179+ for (float index = 0 ; index < sampleCount ; index += 0.5f )
180180 entries .add (new Entry (index + 0.25f , getRandom (10 , 55 )));
181181
182182 ScatterDataSet set = new ScatterDataSet (entries , "Scatter DataSet" );
@@ -195,7 +195,7 @@ private CandleData generateCandleData() {
195195
196196 ArrayList <CandleEntry > entries = new ArrayList <>();
197197
198- for (int index = 0 ; index < count ; index += 2 )
198+ for (int index = 0 ; index < sampleCount ; index += 2 )
199199 entries .add (new CandleEntry (index + 1f , 90 , 70 , 85 , 75f ));
200200
201201 CandleDataSet set = new CandleDataSet (entries , "Candle DataSet" );
@@ -215,7 +215,7 @@ private BubbleData generateBubbleData() {
215215
216216 ArrayList <BubbleEntry > entries = new ArrayList <>();
217217
218- for (int index = 0 ; index < count ; index ++) {
218+ for (int index = 0 ; index < sampleCount ; index ++) {
219219 float y = getRandom (10 , 105 );
220220 float size = getRandom (100 , 105 );
221221 entries .add (new BubbleEntry (index + 0.5f , y , size ));
0 commit comments