本文整理汇总了Java中com.github.mikephil.charting.data.LineDataSet.setCircleColor方法的典型用法代码示例。如果您正苦于以下问题:Java LineDataSet.setCircleColor方法的具体用法?Java LineDataSet.setCircleColor怎么用?Java LineDataSet.setCircleColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.github.mikephil.charting.data.LineDataSet
的用法示例。
在下文中一共展示了LineDataSet.setCircleColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateLineData
import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
private LineData generateLineData() {
LineData d = new LineData();
ArrayList<Entry> entries = new ArrayList<Entry>();
for (int index = 0; index < itemcount; index++)
entries.add(new Entry(index + 0.5f, getRandom(15, 5)));
LineDataSet set = new LineDataSet(entries, "Line DataSet");
set.setColor(Color.rgb(240, 238, 70));
set.setLineWidth(2.5f);
set.setCircleColor(Color.rgb(240, 238, 70));
set.setCircleRadius(5f);
set.setFillColor(Color.rgb(240, 238, 70));
set.setMode(LineDataSet.Mode.CUBIC_BEZIER);
set.setDrawValues(true);
set.setValueTextSize(10f);
set.setValueTextColor(Color.rgb(240, 238, 70));
set.setAxisDependency(YAxis.AxisDependency.LEFT);
d.addDataSet(set);
return d;
}
示例2: createSet
import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
private LineDataSet createSet() {
LineDataSet set = new LineDataSet(null, "Dynamic Data");
set.setAxisDependency(AxisDependency.LEFT);
set.setColor(ColorTemplate.getHoloBlue());
set.setCircleColor(Color.WHITE);
set.setLineWidth(2f);
set.setCircleRadius(4f);
set.setFillAlpha(65);
set.setFillColor(ColorTemplate.getHoloBlue());
set.setHighLightColor(Color.rgb(244, 117, 117));
set.setValueTextColor(Color.WHITE);
set.setValueTextSize(9f);
set.setDrawValues(false);
return set;
}
示例3: buildLineData
import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
private LineData buildLineData(List<Entry> seniors, List<Entry> engineer,
List<Entry> juniors, String[] jobTitles ){
List<ILineDataSet> sets = new ArrayList<>();
if (!seniors.isEmpty()){
LineDataSet dSenior = buildLineDataSet(seniors, jobTitles[0]);
sets.add(dSenior);
}
if (!engineer.isEmpty()){
LineDataSet dEngineer = buildLineDataSet(engineer, jobTitles[1]);
dEngineer.setColor(ColorTemplate.VORDIPLOM_COLORS[0]);
dEngineer.setCircleColor(ColorTemplate.VORDIPLOM_COLORS[0]);
sets.add(dEngineer);
}
if (!juniors.isEmpty()) {
LineDataSet dJunior = buildLineDataSet(juniors, jobTitles[2]);
dJunior.setColor(ColorTemplate.VORDIPLOM_COLORS[2]);
dJunior.setCircleColor(ColorTemplate.VORDIPLOM_COLORS[2]);
sets.add(dJunior);//add data
}
return new LineData(sets);
}
示例4: getData
import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
private LineData getData(ArrayList<Entry> yVals) {
LineDataSet set1 = new LineDataSet(yVals, "");
set1.setLineWidth(1.45f);
set1.setColor(Color.argb(240, 255, 255, 255));
set1.setCircleColor(Color.WHITE);
set1.setHighLightColor(Color.WHITE);
set1.setFillColor(getResources().getColor(R.color.chartFilled));
set1.setDrawCircles(false);
set1.setDrawValues(false);
set1.setDrawFilled(true);
set1.setFillFormatter(new IFillFormatter() {
@Override
public float getFillLinePosition(ILineDataSet dataSet, LineDataProvider dataProvider) {
return priceChart.getAxisLeft().getAxisMinimum();
}
});
LineData data = new LineData(set1);
return data;
}
示例5: generateLineData
import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
private LineData generateLineData() {
LineData d = new LineData();
ArrayList<Entry> entries = new ArrayList<Entry>();
for (int index = 0; index < 3; index++)
entries.add(new Entry(index + 0.5f, UtilsRG.getRandomNumberInRange(0, 1)));
LineDataSet set = new LineDataSet(entries, "Line DataSet");
set.setColor(R.color.colorPrimaryLight);
set.setLineWidth(2.5f);
set.setCircleColor(R.color.colorPrimaryLight);
set.setCircleRadius(5f);
set.setFillColor(R.color.colorPrimaryLight);
set.setMode(LineDataSet.Mode.CUBIC_BEZIER);
set.setDrawValues(true);
set.setValueTextSize(10f);
set.setValueTextColor(R.color.colorPrimaryLight);
set.setAxisDependency(YAxis.AxisDependency.LEFT);
d.addDataSet(set);
return d;
}
示例6: createSet
import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
private LineDataSet createSet() {
LineDataSet set = new LineDataSet(null, getString(R.string.app_name));
set.setAxisDependency(YAxis.AxisDependency.LEFT);
set.setColor(ColorTemplate.getHoloBlue());
set.setCircleColor(Color.WHITE);
set.setLineWidth(1f);
set.setCircleRadius(1.5f);
set.setFillAlpha(65);
set.setFillColor(ColorTemplate.getHoloBlue());
set.setHighLightColor(Color.rgb(244, 117, 117));
set.setValueTextColor(Color.WHITE);
set.setValueTextSize(9f);
set.setDrawValues(false);
return set;
}
示例7: createLineChartData
import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
public LineData createLineChartData()
{
mDashboardHelper = new DashboardHelper(getActivity());
HashMap<String, ArrayList> holder = mDashboardHelper.generateBeaconTotalDurationPerDayMap();
ArrayList<String> xValues = holder.get("dayOfThisMonth");
ArrayList<Entry> entries = holder.get("totalDurationPerDay");
LineDataSet set = new LineDataSet(entries, "");
set.setCircleColor(0xFF2196f3);
set.setCircleRadius(4f);
set.setDrawCircleHole(false);
set.setColor(0xFF2196f3);
set.setLineWidth(2f);
set.setDrawValues(false);
return new LineData(xValues, set);
}
示例8: generateLineData
import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
/**
* 曲线
*/
private LineData generateLineData() {
LineData lineData = new LineData();
ArrayList<Entry> entries = new ArrayList<>();
for (int index = 0; index < items.size(); index++) {
entries.add(new Entry(index + 1f, (float) items.get(index).sub_data.getData()));
}
LineDataSet lineDataSet = new LineDataSet(entries, "对比数据");
lineDataSet.setValues(entries);
lineDataSet.setDrawValues(false);//是否在线上显示值
lineDataSet.setColor(ContextCompat.getColor(mContext, R.color.co3));
lineDataSet.setLineWidth(2.5f);
lineDataSet.setCircleColor(ContextCompat.getColor(mContext, R.color.co3));
lineDataSet.setCircleRadius(5f);
lineDataSet.setDrawCircles(false);
lineDataSet.setMode(LineDataSet.Mode.HORIZONTAL_BEZIER);//设置线条类型
//set.setDrawHorizontalHighlightIndicator(false);//隐藏选中线
//set.setDrawVerticalHighlightIndicator(false);//隐藏选中线条
lineDataSet.setAxisDependency(YAxis.AxisDependency.LEFT);
lineDataSet.setHighlightEnabled(false);
lineData.setHighlightEnabled(false);
lineData.addDataSet(lineDataSet);
return lineData;
}
示例9: generateLineData
import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
private LineData generateLineData() {
LineData d = new LineData();
ArrayList<Entry> entries = new ArrayList<Entry>();
for (int index = 0; index < itemcount; index++)
entries.add(new Entry(getRandom(15, 10), index));
LineDataSet set = new LineDataSet(entries, "Line DataSet");
set.setColor(Color.rgb(240, 238, 70));
set.setLineWidth(2.5f);
set.setCircleColor(Color.rgb(240, 238, 70));
set.setCircleRadius(5f);
set.setFillColor(Color.rgb(240, 238, 70));
set.setDrawCubic(true);
set.setDrawValues(true);
set.setValueTextSize(10f);
set.setValueTextColor(Color.rgb(240, 238, 70));
set.setAxisDependency(YAxis.AxisDependency.LEFT);
d.addDataSet(set);
return d;
}
示例10: createSet
import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
private LineDataSet createSet() {
LineDataSet set = new LineDataSet(null, "BG Data");
set.setAxisDependency(YAxis.AxisDependency.LEFT);
set.setColor(ColorTemplate.getHoloBlue());
set.setCircleColor(Color.WHITE);
set.setLineWidth(2f);
set.setCircleRadius(3f);
set.setFillAlpha(65);
set.setFillColor(ColorTemplate.getHoloBlue());
set.setHighLightColor(Color.rgb(244, 117, 117));
set.setValueTextColor(Color.WHITE);
set.setValueTextSize(9f);
set.setDrawValues(false);
//set.setColors(ColorTemplate.COLORFUL_COLORS);
//set.setColors(ColorTemplate.VORDIPLOM_COLORS);
//set.setColors(ColorTemplate.JOYFUL_COLORS);
//set.setColors(ColorTemplate.LIBERTY_COLORS);
//set.setColors(ColorTemplate.PASTEL_COLORS);
//set.setDrawCubic(chartcubic);
return set;
}
示例11: createSet
import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
private LineDataSet createSet() {
LineDataSet set = new LineDataSet(null, "Dynamic Data");
set.setAxisDependency(YAxis.AxisDependency.LEFT);
set.setColor(ColorTemplate.getHoloBlue());
set.setCircleColor(Color.WHITE);
set.setLineWidth(2f);
set.setCircleRadius(4f);
set.setFillAlpha(65);
set.setFillColor(ColorTemplate.getHoloBlue());
set.setHighLightColor(Color.rgb(244, 117, 117));
set.setValueTextColor(Color.WHITE);
set.setValueTextSize(9f);
set.setDrawValues(false);
return set;
}
示例12: getComplexity
import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
protected LineData getComplexity() {
ArrayList<ILineDataSet> sets = new ArrayList<ILineDataSet>();
LineDataSet ds1 = new LineDataSet(FileUtils.loadEntriesFromAssets(getActivity().getAssets(), "n.txt"), "O(n)");
LineDataSet ds2 = new LineDataSet(FileUtils.loadEntriesFromAssets(getActivity().getAssets(), "nlogn.txt"), "O(nlogn)");
LineDataSet ds3 = new LineDataSet(FileUtils.loadEntriesFromAssets(getActivity().getAssets(), "square.txt"), "O(n\u00B2)");
LineDataSet ds4 = new LineDataSet(FileUtils.loadEntriesFromAssets(getActivity().getAssets(), "three.txt"), "O(n\u00B3)");
ds1.setColor(ColorTemplate.VORDIPLOM_COLORS[0]);
ds2.setColor(ColorTemplate.VORDIPLOM_COLORS[1]);
ds3.setColor(ColorTemplate.VORDIPLOM_COLORS[2]);
ds4.setColor(ColorTemplate.VORDIPLOM_COLORS[3]);
ds1.setCircleColor(ColorTemplate.VORDIPLOM_COLORS[0]);
ds2.setCircleColor(ColorTemplate.VORDIPLOM_COLORS[1]);
ds3.setCircleColor(ColorTemplate.VORDIPLOM_COLORS[2]);
ds4.setCircleColor(ColorTemplate.VORDIPLOM_COLORS[3]);
ds1.setLineWidth(2.5f);
ds1.setCircleRadius(3f);
ds2.setLineWidth(2.5f);
ds2.setCircleRadius(3f);
ds3.setLineWidth(2.5f);
ds3.setCircleRadius(3f);
ds4.setLineWidth(2.5f);
ds4.setCircleRadius(3f);
// load DataSets from textfiles in assets folders
sets.add(ds1);
sets.add(ds2);
sets.add(ds3);
sets.add(ds4);
LineData d = new LineData(sets);
d.setValueTypeface(tf);
return d;
}
示例13: addDataSet
import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
private void addDataSet() {
LineData data = mChart.getData();
if (data != null) {
int count = (data.getDataSetCount() + 1);
ArrayList<Entry> yVals = new ArrayList<Entry>();
for (int i = 0; i < data.getEntryCount(); i++) {
yVals.add(new Entry(i, (float) (Math.random() * 50f) + 50f * count));
}
LineDataSet set = new LineDataSet(yVals, "DataSet " + count);
set.setLineWidth(2.5f);
set.setCircleRadius(4.5f);
int color = mColors[count % mColors.length];
set.setColor(color);
set.setCircleColor(color);
set.setHighLightColor(color);
set.setValueTextSize(10f);
set.setValueTextColor(color);
data.addDataSet(set);
data.notifyDataChanged();
mChart.notifyDataSetChanged();
mChart.invalidate();
}
}
示例14: createSet
import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
private LineDataSet createSet() {
LineDataSet set = new LineDataSet(null, "DataSet 1");
set.setLineWidth(2.5f);
set.setCircleRadius(4.5f);
set.setColor(Color.rgb(240, 99, 99));
set.setCircleColor(Color.rgb(240, 99, 99));
set.setHighLightColor(Color.rgb(190, 190, 190));
set.setAxisDependency(AxisDependency.LEFT);
set.setValueTextSize(10f);
return set;
}
示例15: getData
import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
private LineData getData(int count, float range) {
ArrayList<Entry> yVals = new ArrayList<Entry>();
for (int i = 0; i < count; i++) {
float val = (float) (Math.random() * range) + 3;
yVals.add(new Entry(i, val));
}
// create a dataset and give it a type
LineDataSet set1 = new LineDataSet(yVals, "DataSet 1");
// set1.setFillAlpha(110);
// set1.setFillColor(Color.RED);
set1.setLineWidth(1.75f);
set1.setCircleRadius(5f);
set1.setCircleHoleRadius(2.5f);
set1.setColor(Color.WHITE);
set1.setCircleColor(Color.WHITE);
set1.setHighLightColor(Color.WHITE);
set1.setDrawValues(false);
// create a data object with the datasets
LineData data = new LineData(set1);
return data;
}