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


Java RadarDataSet.setDrawFilled方法代码示例

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


在下文中一共展示了RadarDataSet.setDrawFilled方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setData

import com.github.mikephil.charting.data.RadarDataSet; //导入方法依赖的package包/类
@Override
public void setData(float[] data) {

    ArrayList<RadarEntry> entries1 = new ArrayList<>();

    for (float aData : data) {
        entries1.add(new RadarEntry(aData));
    }

    RadarDataSet set1 = new RadarDataSet(entries1, getString(R.string.app_name));
    set1.setColor(Color.rgb(121, 162, 175));
    set1.setFillColor(Color.rgb(121, 162, 175));
    set1.setDrawFilled(true);
    set1.setFillAlpha(180);
    set1.setLineWidth(2f);
    set1.setDrawHighlightCircleEnabled(true);
    set1.setDrawHighlightIndicators(false);

    RadarData radarData = new RadarData(set1);
    radarData.setValueTextSize(8f);
    radarData.setDrawValues(false);
    radarData.setValueTextColor(Color.WHITE);

    mRadarChart.setData(radarData);
    mRadarChart.invalidate();
}
 
开发者ID:Alex-ZHOU,项目名称:VMAndroid,代码行数:27,代码来源:AnalysisChartFragment.java

示例2: setData

import com.github.mikephil.charting.data.RadarDataSet; //导入方法依赖的package包/类
@Override
public void setData(float[] data) {


    ArrayList<RadarEntry> entries1 = new ArrayList<>();

    for (float aData : data) {
        entries1.add(new RadarEntry(aData));
    }

    RadarDataSet set1 = new RadarDataSet(entries1, getString(R.string.app_name));
    set1.setColor(Color.rgb(121, 162, 175));
    set1.setFillColor(Color.rgb(121, 162, 175));
    set1.setDrawFilled(true);
    set1.setFillAlpha(180);
    set1.setLineWidth(2f);
    set1.setDrawHighlightCircleEnabled(true);
    set1.setDrawHighlightIndicators(false);

    RadarData radarData = new RadarData(set1);
    radarData.setValueTextSize(8f);
    radarData.setDrawValues(false);
    radarData.setValueTextColor(Color.WHITE);

    mRadarChart.setData(radarData);
    mRadarChart.invalidate();
}
 
开发者ID:Alex-ZHOU,项目名称:VMAndroid,代码行数:28,代码来源:AnalysisFragment.java

示例3: addEntries

import com.github.mikephil.charting.data.RadarDataSet; //导入方法依赖的package包/类
public void addEntries(ArrayList<Entry> entries)
{
    RadarDataSet addData = new RadarDataSet(entries, "");
    this.data.addDataSet(addData);
    addData.setDrawFilled(true);
    addData.setDrawValues(false);
}
 
开发者ID:pfiorentino,项目名称:eCarNet,代码行数:8,代码来源:RadarChartCustom.java

示例4: setData

import com.github.mikephil.charting.data.RadarDataSet; //导入方法依赖的package包/类
public void setData() {

        float mult = 80;
        float min = 20;
        int cnt = 5;

        ArrayList<RadarEntry> entries1 = new ArrayList<RadarEntry>();
        ArrayList<RadarEntry> entries2 = new ArrayList<RadarEntry>();

        // NOTE: The order of the entries when being added to the entries array determines their position around the center of
        // the chart.
        for (int i = 0; i < cnt; i++) {
            float val1 = (float) (Math.random() * mult) + min;
            entries1.add(new RadarEntry(val1));

            float val2 = (float) (Math.random() * mult) + min;
            entries2.add(new RadarEntry(val2));
        }

        RadarDataSet set1 = new RadarDataSet(entries1, "Last Week");
        set1.setColor(Color.rgb(103, 110, 129));
        set1.setFillColor(Color.rgb(103, 110, 129));
        set1.setDrawFilled(true);
        set1.setFillAlpha(180);
        set1.setLineWidth(2f);
        set1.setDrawHighlightCircleEnabled(true);
        set1.setDrawHighlightIndicators(false);

        RadarDataSet set2 = new RadarDataSet(entries2, "This Week");
        set2.setColor(Color.rgb(121, 162, 175));
        set2.setFillColor(Color.rgb(121, 162, 175));
        set2.setDrawFilled(true);
        set2.setFillAlpha(180);
        set2.setLineWidth(2f);
        set2.setDrawHighlightCircleEnabled(true);
        set2.setDrawHighlightIndicators(false);

        ArrayList<IRadarDataSet> sets = new ArrayList<IRadarDataSet>();
        sets.add(set1);
        sets.add(set2);

        RadarData data = new RadarData(sets);
        data.setValueTypeface(mTfLight);
        data.setValueTextSize(8f);
        data.setDrawValues(false);
        data.setValueTextColor(Color.WHITE);

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

示例5: setData

import com.github.mikephil.charting.data.RadarDataSet; //导入方法依赖的package包/类
public void setData() {

        float mult = 150;
        int cnt = 9;

        ArrayList<Entry> yVals1 = new ArrayList<Entry>();
        ArrayList<Entry> yVals2 = new ArrayList<Entry>();

        // IMPORTANT: In a PieChart, no values (Entry) should have the same
        // xIndex (even if from different DataSets), since no values can be
        // drawn above each other.
        for (int i = 0; i < cnt; i++) {
            yVals1.add(new Entry((float) (Math.random() * mult) + mult / 2, i));
        }

        for (int i = 0; i < cnt; i++) {
            yVals2.add(new Entry((float) (Math.random() * mult) + mult / 2, i));
        }

        ArrayList<String> xVals = new ArrayList<String>();

        for (int i = 0; i < cnt; i++)
            xVals.add(mParties[i % mParties.length]);

        RadarDataSet set1 = new RadarDataSet(yVals1, "Set 1");
        set1.setColor(ColorTemplate.VORDIPLOM_COLORS[0]);
        set1.setFillColor(ColorTemplate.VORDIPLOM_COLORS[0]);
        set1.setDrawFilled(true);
        set1.setLineWidth(2f);

        RadarDataSet set2 = new RadarDataSet(yVals2, "Set 2");
        set2.setColor(ColorTemplate.VORDIPLOM_COLORS[4]);
        set2.setFillColor(ColorTemplate.VORDIPLOM_COLORS[4]);
        set2.setDrawFilled(true);
        set2.setLineWidth(2f);

        ArrayList<IRadarDataSet> sets = new ArrayList<IRadarDataSet>();
        sets.add(set1);
        sets.add(set2);

        RadarData data = new RadarData(xVals, sets);
        data.setValueTypeface(tf);
        data.setValueTextSize(8f);
        data.setDrawValues(false);

        mChart.setData(data);

        mChart.invalidate();
    }
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:50,代码来源:RadarChartActivitry.java


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