当前位置: 首页>>代码示例>>Java>>正文


Java LineDataSet.setCircleRadius方法代码示例

本文整理汇总了Java中com.github.mikephil.charting.data.LineDataSet.setCircleRadius方法的典型用法代码示例。如果您正苦于以下问题:Java LineDataSet.setCircleRadius方法的具体用法?Java LineDataSet.setCircleRadius怎么用?Java LineDataSet.setCircleRadius使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.github.mikephil.charting.data.LineDataSet的用法示例。


在下文中一共展示了LineDataSet.setCircleRadius方法的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;
    }
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:26,代码来源:CombinedChartActivity.java

示例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;
    }
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:17,代码来源:RealtimeLineChartActivity.java

示例3: setData

import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
private void setData(int count, float range) {

        ArrayList<Entry> entries = new ArrayList<Entry>();

        for (int i = 0; i < count; i++) {
            float xVal = (float) (Math.random() * range);
            float yVal = (float) (Math.random() * range);
            entries.add(new Entry(xVal, yVal));
        }

        // sort by x-value
        Collections.sort(entries, new EntryXComparator());

        // create a dataset and give it a type
        LineDataSet set1 = new LineDataSet(entries, "DataSet 1");

        set1.setLineWidth(1.5f);
        set1.setCircleRadius(4f);

        // create a data object with the datasets
        LineData data = new LineData(set1);

        // set data
        mChart.setData(data);
    }
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:26,代码来源:InvertedLineChartActivity.java

示例4: 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;
    }
 
开发者ID:MarcProe,项目名称:lp2go,代码行数:17,代码来源:ViewControllerScope.java

示例5: 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;
}
 
开发者ID:LadyViktoria,项目名称:wearDrip,代码行数:22,代码来源:wearDripWatchFace.java

示例6: 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;
}
 
开发者ID:jay16,项目名称:shengyiplus-android,代码行数:27,代码来源:HomeTricsActivity.java

示例7: 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;
    }
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:27,代码来源:CombinedChartActivity.java

示例8: 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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:40,代码来源:SimpleFragment.java

示例9: initWithDummyData

import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
private void initWithDummyData() {

        ArrayList<Entry> yVals = new ArrayList<Entry>();

        // create a dataset and give it a type (0)
        LineDataSet set1 = new LineDataSet(yVals, "DataSet");
        set1.setLineWidth(3f);
        set1.setCircleRadius(5f);

        // create a data object with the datasets
        LineData data = new LineData(set1);

        mChart.setData(data);
    }
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:DrawChartActivity.java

示例10: 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();
        }
    }
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:33,代码来源:DynamicalAddingActivity.java

示例11: 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;
    }
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:DynamicalAddingActivity.java

示例12: 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;
    }
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:28,代码来源:LineChartActivityColored.java

示例13: generateDataLine

import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
/**
 * generates a random ChartData object with just one DataSet
 * 
 * @return
 */
private LineData generateDataLine(int cnt) {

    ArrayList<Entry> e1 = new ArrayList<Entry>();

    for (int i = 0; i < 12; i++) {
        e1.add(new Entry(i, (int) (Math.random() * 65) + 40));
    }

    LineDataSet d1 = new LineDataSet(e1, "New DataSet " + cnt + ", (1)");
    d1.setLineWidth(2.5f);
    d1.setCircleRadius(4.5f);
    d1.setHighLightColor(Color.rgb(244, 117, 117));
    d1.setDrawValues(false);
    
    ArrayList<Entry> e2 = new ArrayList<Entry>();

    for (int i = 0; i < 12; i++) {
        e2.add(new Entry(i, e1.get(i).getY() - 30));
    }

    LineDataSet d2 = new LineDataSet(e2, "New DataSet " + cnt + ", (2)");
    d2.setLineWidth(2.5f);
    d2.setCircleRadius(4.5f);
    d2.setHighLightColor(Color.rgb(244, 117, 117));
    d2.setColor(ColorTemplate.VORDIPLOM_COLORS[0]);
    d2.setCircleColor(ColorTemplate.VORDIPLOM_COLORS[0]);
    d2.setDrawValues(false);
    
    ArrayList<ILineDataSet> sets = new ArrayList<ILineDataSet>();
    sets.add(d1);
    sets.add(d2);
    
    LineData cd = new LineData(sets);
    return cd;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:41,代码来源:ListViewMultiChartActivity.java

示例14: onProgressChanged

import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
    
    mChart.resetTracking();

    tvX.setText("" + (mSeekBarX.getProgress()));
    tvY.setText("" + (mSeekBarY.getProgress()));

    ArrayList<ILineDataSet> dataSets = new ArrayList<ILineDataSet>();

    for (int z = 0; z < 3; z++) {

        ArrayList<Entry> values = new ArrayList<Entry>();

        for (int i = 0; i < mSeekBarX.getProgress(); i++) {
            double val = (Math.random() * mSeekBarY.getProgress()) + 3;
            values.add(new Entry(i, (float) val));
        }

        LineDataSet d = new LineDataSet(values, "DataSet " + (z + 1));
        d.setLineWidth(2.5f);
        d.setCircleRadius(4f);

        int color = mColors[z % mColors.length];
        d.setColor(color);
        d.setCircleColor(color);
        dataSets.add(d);
    }

    // make the first DataSet dashed
    ((LineDataSet) dataSets.get(0)).enableDashedLine(10, 10, 0);
    ((LineDataSet) dataSets.get(0)).setColors(ColorTemplate.VORDIPLOM_COLORS);
    ((LineDataSet) dataSets.get(0)).setCircleColors(ColorTemplate.VORDIPLOM_COLORS);

    LineData data = new LineData(dataSets);
    mChart.setData(data);
    mChart.invalidate();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:39,代码来源:MultiLineChartActivity.java

示例15: formatLineDataSet

import com.github.mikephil.charting.data.LineDataSet; //导入方法依赖的package包/类
private void formatLineDataSet(LineDataSet set, int color, int width) {
    set.setDrawValues(false);
    set.setDrawHighlightIndicators(false);
    set.setMode(LineDataSet.Mode.LINEAR);

    set.setColor(color);
    set.setLineWidth(width);
    set.setCircleColor(color);
    set.setCircleRadius(width + 2);
}
 
开发者ID:Protino,项目名称:CodeWatch,代码行数:11,代码来源:DashboardFragment.java


注:本文中的com.github.mikephil.charting.data.LineDataSet.setCircleRadius方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。