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


Java ChartFactory.getLineChartView方法代码示例

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


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

示例1: renderGraph

import org.achartengine.ChartFactory; //导入方法依赖的package包/类
private void renderGraph() {
    mSeries = new XYSeries("Vols/FreqBin");
    div10 = new XYSeries("div10");
    mSeries.add(3,4);
    mRenderer = new XYSeriesRenderer();
    div10Renderer = new XYSeriesRenderer();
    div10Renderer.setColor(root.getResources().getColor(R.color.red));
    dataset.addSeries(mSeries);
    dataset.addSeries(div10);
    renderer.addSeriesRenderer(mRenderer);
    renderer.addSeriesRenderer(div10Renderer);
    renderer.setPanEnabled(false);
    renderer.setZoomEnabled(false);
    mChart = ChartFactory.getLineChartView(getActivity(), dataset, renderer);

    ((LinearLayout)root.findViewById(R.id.chart)).addView(mChart);
}
 
开发者ID:jasper-lu,项目名称:Doppler-Android-Demo,代码行数:18,代码来源:GraphFragment.java

示例2: onResume

import org.achartengine.ChartFactory; //导入方法依赖的package包/类
@Override
protected void onResume() {
	super.onResume();
	if (ds == null)
		getDataset();
	if (render == null)
		getRenderer();
	if (gv == null) {
		LinearLayout layout = (LinearLayout) findViewById(R.id.chart);
		gv = ChartFactory.getLineChartView(this, ds, render);
		layout.addView(gv, new LayoutParams(LayoutParams.FILL_PARENT,
				LayoutParams.FILL_PARENT));
	} else {
		// 绘制图形
		gv.repaint();
	}
}
 
开发者ID:Tifosi-M,项目名称:Hi-Top,代码行数:18,代码来源:RecDetailsActivity.java

示例3: onCreate

import org.achartengine.ChartFactory; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // setContentView(R.layout.activity_main);

    String[] titles = new String[] { "��u1" }; // �w�q��u���W��
    List<double[]> x = new ArrayList<double[]>(); // �I��x����
    List<double[]> y = new ArrayList<double[]>(); // �I��y����
    // �ƭ�X,Y���Эȿ�J
    x.add(new double[] { 4, 5, 6 ,7 , 8, 9,10,11,12,14,15,16,17,18,19,20 ,23});
    y.add(new double[] { 8, 9,8, 9, 6, 9, 9, 10,11, 7, 6, 8, 9, 8,8, 9, 10, 8, 10, 10, 7 });
    XYMultipleSeriesDataset dataset = buildDatset(titles, x, y); // �x�s�y�Э�

    int[] colors = new int[] { Color.BLUE };// ��u���C��
    PointStyle[] styles = new PointStyle[] { PointStyle.CIRCLE }; // ��u�I����
    XYMultipleSeriesRenderer renderer = buildRenderer(colors, styles, true);

    setChartSettings(renderer, "�_�_�ʧ@�έp", "�q2/1�}�l��N��", "����", 0, 150, 0, 15, Color.BLACK);// �w�q��u��
    View chart = ChartFactory.getLineChartView(this, dataset, renderer);
    setContentView(chart);
}
 
开发者ID:cnevinc,项目名称:Movement,代码行数:22,代码来源:Act_RecordStats.java

示例4: getGraph

import org.achartengine.ChartFactory; //导入方法依赖的package包/类
public GraphicalView getGraph(Context context) {
    String title = "";
    double[] xValues = new double[0];
    double[] yValues = new double[0];
    mRenderer = buildRenderer(context);
    mDataset = buildDataset(title, xValues, yValues);

    mLogic.setGraph(this);

    mChartView = ChartFactory.getLineChartView(context, mDataset, mRenderer);
    mChartView.addPanListener(new PanListener() {
        @Override
        public void panApplied() {
            mLogic.mGraphModule.updateGraphCatchErrors(Graph.this);
        }
    });
    mChartView.addZoomListener(new ZoomListener() {
        @Override
        public void zoomReset() {
            mLogic.mGraphModule.updateGraphCatchErrors(Graph.this);
        }

        @Override
        public void zoomApplied(ZoomEvent event) {
            mLogic.mGraphModule.updateGraphCatchErrors(Graph.this);
        }
    }, true, true);

    mLogic.mGraphModule.updateGraphCatchErrors(this);

    return mChartView;
}
 
开发者ID:gigabytedevelopers,项目名称:CalcMate,代码行数:33,代码来源:Graph.java

示例5: onResume

import org.achartengine.ChartFactory; //导入方法依赖的package包/类
@Override
protected void onResume() {
  super.onResume();
  if (mChartView == null) {
    LinearLayout layout = (LinearLayout) findViewById(R.id.chart);
    mChartView = ChartFactory.getLineChartView(this, mDataset, mRenderer);
    // enable the chart click events
    mRenderer.setClickEnabled(true);
    mRenderer.setSelectableBuffer(10);
    mChartView.setOnClickListener(new View.OnClickListener() {
      public void onClick(View v) {
        // handle the click event on the chart
        SeriesSelection seriesSelection = mChartView.getCurrentSeriesAndPoint();
        if (seriesSelection == null) {
          Toast.makeText(XYChartBuilder.this, "No chart element", Toast.LENGTH_SHORT).show();
        } else {
          // display information of the clicked point
          Toast.makeText(
              XYChartBuilder.this,
              "Chart element in series index " + seriesSelection.getSeriesIndex()
                  + " data point index " + seriesSelection.getPointIndex() + " was clicked"
                  + " closest point value X=" + seriesSelection.getXValue() + ", Y="
                  + seriesSelection.getValue(), Toast.LENGTH_SHORT).show();
        }
      }
    });
    layout.addView(mChartView, new LayoutParams(LayoutParams.FILL_PARENT,
        LayoutParams.FILL_PARENT));
    boolean enabled = mDataset.getSeriesCount() > 0;
    setSeriesWidgetsEnabled(enabled);
  } else {
    mChartView.repaint();
  }
}
 
开发者ID:ddanny,项目名称:achartengine,代码行数:35,代码来源:XYChartBuilder.java

示例6: createView

import org.achartengine.ChartFactory; //导入方法依赖的package包/类
@Override
public View createView(Context context) {
    view =  ChartFactory.getLineChartView(context, dataset, renderer);
    view.setLayoutParams(new FrameLayout.LayoutParams(
            LinearLayout.LayoutParams.MATCH_PARENT,
            LinearLayout.LayoutParams.MATCH_PARENT));
    return view;
}
 
开发者ID:MichalDanielDobrzanski,项目名称:WalkingSynth,代码行数:9,代码来源:AchartEngineGraphView.java

示例7: getView

import org.achartengine.ChartFactory; //导入方法依赖的package包/类
/**
 * return graph view to activity
 */
public GraphicalView getView(Context context) {
	final GraphicalView graphView = ChartFactory.getLineChartView(context, mDataset, mMultiRenderer);
	return graphView;
}
 
开发者ID:runtimeco,项目名称:Android-DFU-App,代码行数:8,代码来源:LineGraphView.java

示例8: createGraph

import org.achartengine.ChartFactory; //导入方法依赖的package包/类
protected void createGraph() {
        graphRenderer = new XYMultipleSeriesRenderer();

        graphRenderer.setChartTitle("Line Graph");
        graphRenderer.setChartTitleTextSize(50);
        graphRenderer.setMargins(new int[] {100, 100, 70, 50});     // top, left, bottom, right

        graphRenderer.setBackgroundColor(Color.WHITE);
        graphRenderer.setMarginsColor(Color.parseColor("#FFFFFF"));
        graphRenderer.setAxesColor(Color.DKGRAY);

        graphRenderer.setXTitle("Time(sec)");
        graphRenderer.setYTitle("Value");
        graphRenderer.setAxisTitleTextSize(30);
        graphRenderer.setLabelsTextSize(25);
        graphRenderer.setYLabelsAlign(Paint.Align.RIGHT);

//        graphRenderer.setPointSize(50);
        graphRenderer.setLegendTextSize(30);

        graphRenderer.setXAxisMin(0);
        graphRenderer.setXAxisMax(100);
        graphRenderer.setZoomEnabled(false, false);

        graphDataSerieses = new XYSeries[sensorInfo.getType().getValueNumbers()];
        XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();;
        for(int loop1 = 0 ; loop1 < sensorInfo.getType().getValueNumbers() ; loop1++) {
            graphDataSerieses[loop1] = new TimeSeries(sensorInfo.getType().getValueInfos()[loop1][0] + "(" + sensorInfo.getType().getValueInfos()[loop1][1] + ")");
            dataset.addSeries(graphDataSerieses[loop1]);

            XYSeriesRenderer seriesRenderer = new XYSeriesRenderer();
            seriesRenderer.setColor(Color.parseColor(COLORS[loop1]));
            seriesRenderer.setPointStyle(PointStyle.POINT);
            seriesRenderer.setLineWidth(3);
            graphRenderer.addSeriesRenderer(seriesRenderer);
        }
        graphView = ChartFactory.getLineChartView(this, dataset, graphRenderer);

        LinearLayout graphArea = (LinearLayout) findViewById(R.id.ll_graph_area);
        graphArea.addView(graphView);
        graphArea.setClickable(false);
    }
 
开发者ID:SKT-ThingPlug,项目名称:thingplug-sdk-android,代码行数:43,代码来源:SensorDetailActivity.java

示例9: getView

import org.achartengine.ChartFactory; //导入方法依赖的package包/类
public GraphicalView getView(Context context) 
{
	view =  ChartFactory.getLineChartView(context, mDataset, mRenderer);
	return view;
}
 
开发者ID:lskk,项目名称:Steppy-Android,代码行数:6,代码来源:LineGraph.java

示例10: getGraphView

import org.achartengine.ChartFactory; //导入方法依赖的package包/类
public GraphicalView getGraphView(Context context){
    view = ChartFactory.getLineChartView(context, mSeriesDataset, mSeriesRenderer);
    return view;
}
 
开发者ID:ZhengshuaiPENG,项目名称:AndroidInnerSensorMonitor,代码行数:5,代码来源:AccelerometerGraph.java

示例11: getGpsView

import org.achartengine.ChartFactory; //导入方法依赖的package包/类
public GraphicalView getGpsView(Context context){
    view = ChartFactory.getLineChartView(context, mSeriesDataset, mSeriesRenderer);
    return view;
}
 
开发者ID:ZhengshuaiPENG,项目名称:AndroidInnerSensorMonitor,代码行数:5,代码来源:GpsGraph.java

示例12: getProximityView

import org.achartengine.ChartFactory; //导入方法依赖的package包/类
public GraphicalView getProximityView(Context context) {
    // use factory to get a line chart
    graphicalView = ChartFactory.getLineChartView(context, mSeriesDataset, mRenderer);
    return graphicalView;
}
 
开发者ID:ZhengshuaiPENG,项目名称:AndroidInnerSensorMonitor,代码行数:6,代码来源:ProximityGraph.java

示例13: getTemperatureView

import org.achartengine.ChartFactory; //导入方法依赖的package包/类
public GraphicalView getTemperatureView(Context context){
    // use factory to get a line chart
    graphicalView = ChartFactory.getLineChartView(context, mSeriesDataset, mRenderer);
    return graphicalView;
}
 
开发者ID:ZhengshuaiPENG,项目名称:AndroidInnerSensorMonitor,代码行数:6,代码来源:TemperatureGraph.java

示例14: getLightView

import org.achartengine.ChartFactory; //导入方法依赖的package包/类
public GraphicalView getLightView(Context context) {
    // use factory to get a line chart
    graphicalView = ChartFactory.getLineChartView(context, mSeriesDataset, mRenderer);
    return graphicalView;
}
 
开发者ID:ZhengshuaiPENG,项目名称:AndroidInnerSensorMonitor,代码行数:6,代码来源:LightGraph.java

示例15: getGravityView

import org.achartengine.ChartFactory; //导入方法依赖的package包/类
public GraphicalView getGravityView(Context context){
    // use factory to get a line chart
    graphicalView = ChartFactory.getLineChartView(context, mSeriesDataset, mRenderer);
    return graphicalView;
}
 
开发者ID:ZhengshuaiPENG,项目名称:AndroidInnerSensorMonitor,代码行数:6,代码来源:GravityGraph.java


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