???? ??? ????? ?????? > ???? ????

???? ?? ????? ???????
“???? ????????????? ?????” ???????, ????????? ??? ?????????? ??????
???? ????????? ???? ????? ???????????? ????? ??? / ????? ??? ????????? ?
???? ????? ?????? ?????? “???? ????????????? ?????” ????????? ???????? ???? ?????? ????????????? ??????? ?? ????????? ? ????? ????? ?????? ?????? ??? ????? ?????? ?? ?? ????????? ???????? ??? ????????????? ??????? ?? ????????? ? ????? ????? ?????? ?????? ???? ????????? ????? ???? ?? ????????????? ??????? ?? ????????? ? ?
?????? ???????
????????????? ???????”???? ????????????? ?????” ?????????? ?????? ?????????? ?????????????????? ????????? ?????? (??????? )
??????
????? ??? ???
?????????? ?? ?????????
?????? ????????????? ????????????? ? ???? ???? ???? ????? ????? ,
??????? ?????????? ??????? ??? ? ??????, ?? ?? ????? , ????? ?? ?????
?????? ???? ????????? ???? ???? ??? ??? ? ???, ???? ????? ?????????
????? ??? ??????? ???? ????? ??????? ????? ????? , ????? ????? ????? ??
????? ???????? ???? ?????? ?
?? ????????? ???????? ??? ???? ??????? ??????? ????? ???? ?????? :
?????? ???? ?????? ???? ??????????? ???? ????????????? ??? ???????? ????????? ????? ? ??? ????? ??????
> ???? ???? ???? ?????? ?????? ??? ?????? ?? ????????? ???????? ??? ????? :
build.graddle(app) ????? ??????? ??? ?????? ???? :
repositories {
maven { url “https://jitpack.io” }
}
dependencies {
compile ‘com.github.PhilJay:MPAndroidChart:v2.0.9’
}
activity_main.xml ????? ??????? ??? ???? ?????? ???? :

???? ????? ????????? ????? ?????, ???
com.github.mikephil.charting.charts ??????? ????????? ????????????? ???
????? ?????? ???? ???? ?
MainActivity.java ????? ??????? ??? ?? ?????? ???? :
import android.os.Bundle;
import android.graphics.Color;
import java.util.ArrayList;
import com.github.mikephil.charting.charts.BarChart;
import com.github.mikephil.charting.data.BarData;
import com.github.mikephil.charting.data.BarDataSet;
import com.github.mikephil.charting.data.BarEntry;
import android.support.v7.app.ActionBarActivity;
import com.github.mikephil.charting.utils.ColorTemplate;
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
BarChart chart = (BarChart) findViewById(R.id.chart);
BarData data = new BarData(getXAxisValues(), getDataSet());
chart.setData(data);
chart.setDescription(“???? ????? “);
chart.animateXY(2000, 2000);
chart.invalidate();
}
private ArrayList getDataSet() {
ArrayList dataSets = null;
ArrayList valueSet1 = new ArrayList();
BarEntry v1e1 = new BarEntry(100.000f, 0); // ??
valueSet1.add(v1e1);
BarEntry v1e2 = new BarEntry(80.000f, 1); // ???
valueSet1.add(v1e2);
BarEntry v1e3 = new BarEntry(60.000f, 2); // ???
valueSet1.add(v1e3);
BarEntry v1e4 = new BarEntry(40.000f, 3); // ????
valueSet1.add(v1e4);
BarEntry v1e5 = new BarEntry(90.000f, 4); //???
valueSet1.add(v1e5);
BarEntry v1e6 = new BarEntry(10.000f, 5); // ??????
valueSet1.add(v1e6);
ArrayList valueSet2 = new ArrayList();
BarEntry v2e1 = new BarEntry(50.000f, 0); // ??
valueSet2.add(v2e1);
BarEntry v2e2 = new BarEntry(40.000f, 1); // ???
valueSet2.add(v2e2);
BarEntry v2e3 = new BarEntry(30.000f, 2); // ???
valueSet2.add(v2e3);
BarEntry v2e4 = new BarEntry(20.000f, 3); // ????
valueSet2.add(v2e4);
BarEntry v2e5 = new BarEntry(5.000f, 4); // ???
valueSet2.add(v2e5);
BarEntry v2e6 = new BarEntry(80.000f, 5); // ??????
valueSet2.add(v2e6);
BarDataSet barDataSet1 = new BarDataSet(valueSet1, “??? ??? “);
barDataSet1.setColor(Color.rgb(0, 155, 0));
BarDataSet barDataSet2 = new BarDataSet(valueSet2, “???? ????? ???”);
barDataSet2.setColors(ColorTemplate.LIBERTY_COLORS);
dataSets = new ArrayList();
dataSets.add(barDataSet1);
dataSets.add(barDataSet2);
return dataSets;
}
private ArrayList getXAxisValues() {
ArrayList xAxis = new ArrayList();
xAxis.add(“??”);
xAxis.add(“???”);
xAxis.add(“???”);
xAxis.add(“????”);
xAxis.add(“???”);
xAxis.add(“??????”);
return xAxis;
}
}
“?? ???? ??? ??? ????? ?? ?? ???? ?? ????? ”
????? :
?? ??? ???? ????????????? ??????? ?? ????????? ?? ????? ??? ????? ???? ??????? ????? ????? ???? :

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

????? ?? ????? ?????? ???? “??? ?????” ??????????? ??? ????? ?
BarEntry ????? ???? ??? ????? ?? ???? ???? ???? ??? ????? ? BarEntry
????? ?? ?? Entry ????? ?? ???? ???-????? ?? — ?? ???? ???? ?? ????
???-????? ?? ??????????? ? ?? BarEntry ??? ??? ????? BarDataSet ? ?
chart.setData(data) ???? ???????? ??? ?? ??? ??? ??? ????? ?
chart.invalidate() ???? ???????? ??? ??? ???? ??? ????? ? ???????? ???
????? ?

x

Hi!
I'm Ethel!

Would you like to get a custom essay? How about receiving a customized one?

Check it out