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


Java ScatterChart.ScatterShape方法代码示例

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


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

示例1: generateScatterData

import com.github.mikephil.charting.charts.ScatterChart; //导入方法依赖的package包/类
protected ScatterData generateScatterData(int dataSets, float range, int count) {
    
    ArrayList<IScatterDataSet> sets = new ArrayList<IScatterDataSet>();
    
    ScatterChart.ScatterShape[] shapes = ScatterChart.ScatterShape.getAllDefaultShapes();
    
    for(int i = 0; i < dataSets; i++) {
       
        ArrayList<Entry> entries = new ArrayList<Entry>();
        
        for(int j = 0; j < count; j++) {        
            entries.add(new Entry(j, (float) (Math.random() * range) + range / 4));
        }
        
        ScatterDataSet ds = new ScatterDataSet(entries, getLabel(i));
        ds.setScatterShapeSize(12f);
        ds.setScatterShape(shapes[i % shapes.length]);
        ds.setColors(ColorTemplate.COLORFUL_COLORS);
        ds.setScatterShapeSize(9f);
        sets.add(ds);
    }
    
    ScatterData d = new ScatterData(sets);
    d.setValueTypeface(tf);
    return d;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:27,代码来源:SimpleFragment.java

示例2: getRendererForShape

import com.github.mikephil.charting.charts.ScatterChart; //导入方法依赖的package包/类
public static IShapeRenderer getRendererForShape(ScatterChart.ScatterShape shape) {

        switch (shape) {
            case SQUARE:
                return new SquareShapeRenderer();
            case CIRCLE:
                return new CircleShapeRenderer();
            case TRIANGLE:
                return new TriangleShapeRenderer();
            case CROSS:
                return new CrossShapeRenderer();
            case X:
                return new XShapeRenderer();
            case CHEVRON_UP:
                return new ChevronUpShapeRenderer();
            case CHEVRON_DOWN:
                return new ChevronDownShapeRenderer();
        }

        return null;
    }
 
开发者ID:PhilJay,项目名称:MPAndroidChart-Realm,代码行数:22,代码来源:RealmScatterDataSet.java

示例3: getRendererForShape

import com.github.mikephil.charting.charts.ScatterChart; //导入方法依赖的package包/类
public static IShapeRenderer getRendererForShape(ScatterChart.ScatterShape shape) {

        switch (shape) {
            case SQUARE: return new SquareShapeRenderer();
            case CIRCLE: return new CircleShapeRenderer();
            case TRIANGLE: return new TriangleShapeRenderer();
            case CROSS: return new CrossShapeRenderer();
            case X: return new XShapeRenderer();
            case CHEVRON_UP: return new ChevronUpShapeRenderer();
            case CHEVRON_DOWN: return new ChevronDownShapeRenderer();
        }

        return null;
    }
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:ScatterDataSet.java

示例4: generateScatterData

import com.github.mikephil.charting.charts.ScatterChart; //导入方法依赖的package包/类
/**
 * Generate scatter data scatter data.
 *
 * @param dataSets the data sets
 * @param range    the range
 * @param count    the count
 * @return the scatter data
 */
protected ScatterData generateScatterData(int dataSets, float range, int count) {

    ArrayList<IScatterDataSet> sets = new ArrayList<IScatterDataSet>();

    ScatterChart.ScatterShape[] shapes = ScatterChart.ScatterShape.getAllDefaultShapes();

    for(int i = 0; i < dataSets; i++) {

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

        for(int j = 0; j < count; j++) {
            entries.add(new Entry(j, (float) (Math.random() * range) + range / 4));
        }

        ScatterDataSet ds = new ScatterDataSet(entries, getLabel(i));
        ds.setScatterShapeSize(12f);
        ds.setScatterShape(shapes[i % shapes.length]);
        ds.setColors(ColorTemplate.COLORFUL_COLORS);
        ds.setScatterShapeSize(9f);
        sets.add(ds);
    }

    ScatterData d = new ScatterData(sets);
    d.setValueTypeface(tf);
    return d;
}
 
开发者ID:bounswe,项目名称:bounswe2016group2,代码行数:35,代码来源:userHomeFragment.java

示例5: getScatterShape

import com.github.mikephil.charting.charts.ScatterChart; //导入方法依赖的package包/类
@Override
public ScatterChart.ScatterShape getScatterShape() {
    return mScatterShape;
}
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:5,代码来源:RealmScatterDataSet.java

示例6: setScatterShape

import com.github.mikephil.charting.charts.ScatterChart; //导入方法依赖的package包/类
/**
 * Sets the ScatterShape this DataSet should be drawn with. This will search for an available IShapeRenderer and set this
 * renderer for the DataSet.
 *
 * @param shape
 */
public void setScatterShape(ScatterChart.ScatterShape shape) {
    mShapeRenderer = getRendererForShape(shape);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:10,代码来源:ScatterDataSet.java

示例7: setScatterShape

import com.github.mikephil.charting.charts.ScatterChart; //导入方法依赖的package包/类
/**
 * Sets the shape that is drawn on the position where the values are at. If
 * "CUSTOM" is chosen, you need to call setCustomScatterShape(...) and
 * provide a path object that is drawn as the custom scattershape.
 *
 * @param shape
 */
public void setScatterShape(ScatterChart.ScatterShape shape) {
    mScatterShape = shape;
}
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:11,代码来源:RealmScatterDataSet.java

示例8: getScatterShape

import com.github.mikephil.charting.charts.ScatterChart; //导入方法依赖的package包/类
/**
 * Returns all the different scattershapes the chart uses
 *
 * @return
 */
ScatterChart.ScatterShape getScatterShape();
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:7,代码来源:IScatterDataSet.java

示例9: setScatterShape

import com.github.mikephil.charting.charts.ScatterChart; //导入方法依赖的package包/类
/**
 * Sets the shapeIdentifier that this DataSet should be drawn with.
 * Make sure the ScatterChart has a renderer capable of rendering the provided identifier.
 *
 * @param shape
 */
public void setScatterShape(ScatterChart.ScatterShape shape) {
    mScatterShape = shape.toString();
}
 
开发者ID:pencil-box,项目名称:NetKnight,代码行数:10,代码来源:ScatterDataSet.java

示例10: setScatterShape

import com.github.mikephil.charting.charts.ScatterChart; //导入方法依赖的package包/类
/**
 * Sets the shape that is drawn on the position where the values are at.
 *
 * @param shape
 */
public void setScatterShape(ScatterChart.ScatterShape shape) {
    mScatterShape = shape.toString();
}
 
开发者ID:pencil-box,项目名称:NetKnight,代码行数:9,代码来源:RealmScatterDataSet.java

示例11: setScatterShape

import com.github.mikephil.charting.charts.ScatterChart; //导入方法依赖的package包/类
/**
 * Sets the ScatterShape this DataSet should be drawn with. This will search for an available ShapeRenderer and set this
 * renderer for the DataSet.
 *
 * @param shape
 */
public void setScatterShape(ScatterChart.ScatterShape shape) {

    ShapeRendererHandler handler = new ShapeRendererHandler();
    mShapeRenderer = handler.getShapeRenderer(shape);
}
 
开发者ID:letolab,项目名称:LETO-Toggl_Android,代码行数:12,代码来源:ScatterDataSet.java

示例12: getShapeRenderer

import com.github.mikephil.charting.charts.ScatterChart; //导入方法依赖的package包/类
/**
 * Returns the corresponding ShapeRenderer for a given ScatterShape.
 *
 * @param shape
 * @return
 */
public ShapeRenderer getShapeRenderer(ScatterChart.ScatterShape shape) {
    return shapeRendererList.get(shape.toString());
}
 
开发者ID:letolab,项目名称:LETO-Toggl_Android,代码行数:10,代码来源:ShapeRendererHandler.java

示例13: setScatterShape

import com.github.mikephil.charting.charts.ScatterChart; //导入方法依赖的package包/类
/**
 * Sets the shape that is drawn on the position where the values are at.
 *
 * @param shape
 */
public void setScatterShape(ScatterChart.ScatterShape shape) {
    mScatterShape = shape;
}
 
开发者ID:muyoumumumu,项目名称:QuShuChe,代码行数:9,代码来源:ScatterDataSet.java


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