File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
src/com/xxmassdeveloper/mpchartexample/realm Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ repositories {
5656dependencies {
5757 // compile fileTree(dir: 'libs', include: ['*.jar'])
5858 // compile project(':MPChartLib-Realm') // clone "https://github.com/PhilJay/MPAndroidChart-Realm" to get this or uncomment the gradle dependency below:
59- compile ' com.github.PhilJay:MPAndroidChart-Realm:v1.1.0 @aar'
59+ compile ' com.github.PhilJay:MPAndroidChart-Realm:v2.0.2 @aar'
6060
6161 compile project(' :MPChartLib' )
6262 compile ' com.android.support:appcompat-v7:24.2.1'
Original file line number Diff line number Diff line change 66import com .github .mikephil .charting .animation .Easing ;
77import com .github .mikephil .charting .charts .LineChart ;
88import com .github .mikephil .charting .data .LineData ;
9+ import com .github .mikephil .charting .data .LineDataSet ;
910import com .github .mikephil .charting .data .realm .implementation .RealmLineDataSet ;
1011import com .github .mikephil .charting .interfaces .datasets .ILineDataSet ;
1112import com .github .mikephil .charting .utils .ColorTemplate ;
@@ -55,13 +56,13 @@ private void setData() {
5556 RealmResults <RealmDemoData > result = mRealm .where (RealmDemoData .class ).findAll ();
5657
5758 RealmLineDataSet <RealmDemoData > set = new RealmLineDataSet <RealmDemoData >(result , "xValue" , "yValue" );
58- set .setDrawCubic ( false );
59+ set .setMode ( LineDataSet . Mode . CUBIC_BEZIER );
5960 set .setLabel ("Realm LineDataSet" );
6061 set .setDrawCircleHole (false );
6162 set .setColor (ColorTemplate .rgb ("#FF5722" ));
6263 set .setCircleColor (ColorTemplate .rgb ("#FF5722" ));
6364 set .setLineWidth (1.8f );
64- set .setCircleSize (3.6f );
65+ set .setCircleRadius (3.6f );
6566
6667 ArrayList <ILineDataSet > dataSets = new ArrayList <ILineDataSet >();
6768 dataSets .add (set ); // add the dataset
Original file line number Diff line number Diff line change 99import com .github .mikephil .charting .components .AxisBase ;
1010import com .github .mikephil .charting .data .BarData ;
1111import com .github .mikephil .charting .data .LineData ;
12+ import com .github .mikephil .charting .data .LineDataSet ;
1213import com .github .mikephil .charting .data .realm .implementation .RealmBarDataSet ;
1314import com .github .mikephil .charting .data .realm .implementation .RealmLineDataSet ;
1415import com .github .mikephil .charting .formatter .IAxisValueFormatter ;
@@ -100,13 +101,13 @@ public int getDecimalDigits() {
100101 barChart .getXAxis ().setValueFormatter (formatter );
101102
102103 RealmLineDataSet <Score > lineDataSet = new RealmLineDataSet <Score >(results , "scoreNr" , "totalScore" );
103- lineDataSet .setDrawCubic ( false );
104+ lineDataSet .setMode ( LineDataSet . Mode . CUBIC_BEZIER );
104105 lineDataSet .setLabel ("Result Scores" );
105106 lineDataSet .setDrawCircleHole (false );
106107 lineDataSet .setColor (ColorTemplate .rgb ("#FF5722" ));
107108 lineDataSet .setCircleColor (ColorTemplate .rgb ("#FF5722" ));
108109 lineDataSet .setLineWidth (1.8f );
109- lineDataSet .setCircleSize (3.6f );
110+ lineDataSet .setCircleRadius (3.6f );
110111
111112 ArrayList <ILineDataSet > dataSets = new ArrayList <ILineDataSet >();
112113 dataSets .add (lineDataSet );
You can’t perform that action at this time.
0 commit comments