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


Java LineGraphSeries.setDataPointsRadius方法代码示例

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


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

示例1: onCreate

import com.jjoe64.graphview.series.LineGraphSeries; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_graph2);

    GraphView graph = (GraphView) findViewById(R.id.graph);

    LineGraphSeries<DataPoint> series = new LineGraphSeries<>(new DataPoint[] {
            new DataPoint(0, 4),
            new DataPoint(1, 5),
            new DataPoint(2, 3),
            new DataPoint(3, 2),
            new DataPoint(4, 6),
            new DataPoint(5, 3),
            new DataPoint(6, 1)
    });
    series.setColor(Color.parseColor("#b485f2"));
    series.setDrawDataPoints(true);
    series.setDataPointsRadius(10);
    series.setThickness(5);

    graph.addSeries(series);
    graph.getGridLabelRenderer().setHorizontalLabelsColor(Color.parseColor("#777777"));
    graph.getGridLabelRenderer().setVerticalLabelsColor(Color.parseColor("#777777"));
    graph.getGridLabelRenderer().setTextSize(30);

    graph.getViewport().setXAxisBoundsManual(true);
    graph.getViewport().setMaxX(6);

}
 
开发者ID:inceleb,项目名称:InstagramManager-Android,代码行数:31,代码来源:GraphActivity.java

示例2: onCreate

import com.jjoe64.graphview.series.LineGraphSeries; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_graph);

    GraphView graph = (GraphView) findViewById(R.id.graph);

    LineGraphSeries<DataPoint> series = new LineGraphSeries<>(new DataPoint[] {
            new DataPoint(0, 4),
            new DataPoint(1, 5),
            new DataPoint(2, 3),
            new DataPoint(3, 2),
            new DataPoint(4, 6),
            new DataPoint(5, 3),
            new DataPoint(6, 1)
    });
    series.setColor(Color.parseColor("#b485f2"));
    series.setDrawDataPoints(true);
    series.setDataPointsRadius(10);
    series.setThickness(5);

    graph.addSeries(series);
    graph.getGridLabelRenderer().setHorizontalLabelsColor(Color.parseColor("#777777"));
    graph.getGridLabelRenderer().setVerticalLabelsColor(Color.parseColor("#777777"));
    graph.getGridLabelRenderer().setTextSize(30);
    
    graph.getViewport().setXAxisBoundsManual(true);
    graph.getViewport().setMaxX(6);

}
 
开发者ID:inceleb,项目名称:InstagramManager-Android,代码行数:31,代码来源:GraphActivity.java

示例3: onPageVisible

import com.jjoe64.graphview.series.LineGraphSeries; //导入方法依赖的package包/类
public void onPageVisible(final DataPoint[] datapoints, DataPoint[] averages) {
	if(datapoints != null && averages != null) {
		progressBar.setVisibility(View.GONE);
		graphView.removeAllSeries();
		DataPoint[] list = Arrays.copyOfRange(datapoints, Math.max(0, datapoints.length - period.getDays()), datapoints.length);
		LineGraphSeries<DataPoint> datapointsSerie = new LineGraphSeries<>(list);
		datapointsSerie.setDrawDataPoints(true);
		datapointsSerie.setColor(getContext().getResources().getColor(R.color.green));
		datapointsSerie.setTitle(getContext().getResources().getString(R.string.daily_average));
		datapointsSerie.setOnDataPointTapListener(this);
		graphView.addSeries(datapointsSerie);

		LineGraphSeries<DataPoint> averageSerie = new LineGraphSeries<>(Arrays.copyOfRange(averages, Math.max(0, averages.length - period.getDays()), averages.length));
		averageSerie.setColor(getContext().getResources().getColor(R.color.orange));
		averageSerie.setTitle(getContext().getResources().getString(R.string.trend));
		averageSerie.setDrawDataPoints(true);
		averageSerie.setDataPointsRadius(6f);
		averageSerie.setOnDataPointTapListener(this);
		graphView.addSeries(averageSerie);

		graphView.getViewport().setMinX(datapointsSerie.getLowestValueX());
		graphView.getViewport().setMaxX(datapointsSerie.getHighestValueX());
		graphView.getViewport().setXAxisBoundsManual(true);

		graphView.getGridLabelRenderer().setNumHorizontalLabels(period.getNbLabels());
		graphView.getGridLabelRenderer().setNumVerticalLabels(10);
		graphView.getLegendRenderer().setVisible(true);
		graphView.getLegendRenderer().setBackgroundColor(getContext().getResources().getColor(R.color.grand_exchange_legend));
		graphView.getLegendRenderer().setAlign(LegendRenderer.LegendAlign.TOP);

		graphView.getGridLabelRenderer().setHumanRounding(false, true);

		graphView.setVisibility(View.VISIBLE);
	}
}
 
开发者ID:OSRSHelper,项目名称:OSRSHelper,代码行数:36,代码来源:GrandExchangePeriodFragment.java


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