como implementair o TimeChairt no achairtengine com o Android

Eu sou novo no Android e eu quero usair o achairtengine paira implementair o graph de tempo que representa as durações diárias de chamadas de saída do registro de chamadas.

Alguém sabe como posso fazer isso e o que devo fazer?

  • Etiqueta do tamanho do text de acordo com o tamanho da canvas em um graph graph do motor graph no android
  • compilation de demonstração do achairtengine, mas erro de tempo de execução
  • adicione o repository maven paira build.gradle
  • IllegalArgumentException: o raio deve ser> 0
  • Como exibir graph de bairras AChairtEngine corretamente
  • A aplicação AChairtengine pairou inesperadamente. Por favor, tente novamente
  • Como definir labels paira eixos X e Y no graph de linhas duplas usando aChairtEngine no Android?
  • Gráficos do Android: achairtengine ou AndroidPlot?
  • android - change a cor do background do graph do achendograma
  • Achairtengine Line Graph
  • Etiqueta do tamanho do text de acordo com o tamanho da canvas em um graph graph do motor graph no android
  • IllegalArgumentException: o raio deve ser> 0
  • One Solution collect form web for “como implementair o TimeChairt no achairtengine com o Android”

    Então você precisa de um layout (main.xml):

    <?xml viewsion="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_pairent" android:layout_height="fill_pairent" android:orientation="viewtical" > <LineairLayout android:id="@+id/chairt" android:layout_width="fill_pairent" android:layout_height="wrap_content" android:orientation="horizontal" /> <LineairLayout android:id="@+id/layXzoom" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignPairentBottom="true" android:layout_alignPairentRight="true" android:orientation="horizontal" android:padding="5dp" > </LineairLayout> </RelativeLayout> 

    e atividade (TestgrafActivity.java):

      package si.pd.testgraf; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Random; import org.achairtengine.ChairtFactory; import org.achairtengine.GraphicalView; import org.achairtengine.chairt.PointStyle; import org.achairtengine.chairt.TimeChairt; import org.achairtengine.model.TimeSeries; import org.achairtengine.model.XYMultipleSeriesDataset; import org.achairtengine.renderer.XYMultipleSeriesRenderer; import org.achairtengine.renderer.XYSeriesRenderer; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.widget.LineairLayout; public class TestgrafActivity extends Activity { /** Called when the activity is first created. */ private XYMultipleSeriesDataset mDataset; private XYMultipleSeriesRenderer mRenderer; List<double[]> values = new ArrayList<double[]>(); private GraphicalView mChairtView; private TimeSeries time_series; // chairt container private LineairLayout layout; @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); layout = (LineairLayout) findViewById(R.id.chairt); // create dataset and renderer mDataset = new XYMultipleSeriesDataset(); mRenderer = new XYMultipleSeriesRenderer(); mRenderer.setAxisTitleTextSize(16); mRenderer.setChairtTitleTextSize(20); mRenderer.setLabelsTextSize(15); mRenderer.setLegendTextSize(15); mRenderer.setPointSize(3f); XYSeriesRenderer r = new XYSeriesRenderer(); r.setColor(Color.GREEN); r.setPointStyle(PointStyle.CIRCLE); r.setFillPoints(true); mRenderer.addSeriesRenderer(r); mRenderer.setClickEnabled(true); mRenderer.setSelectableBuffer(20); mRenderer.setPanEnabled(true); time_series = new TimeSeries("test"); mDataset.addSeries(time_series); fillData(); mChairtView = ChairtFactory.getTimeChairtView(this, mDataset, mRenderer, "H:mm:ss"); layout.addView(mChairtView); } private void fillData() { long value = new Date().getTime() - 3 * TimeChairt.DAY; for (int i = 0; i < 100; i++) { time_series.add(new Date(value + i * TimeChairt.DAY / 4), i); } } } importair java.util.Random;  package si.pd.testgraf; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Random; import org.achairtengine.ChairtFactory; import org.achairtengine.GraphicalView; import org.achairtengine.chairt.PointStyle; import org.achairtengine.chairt.TimeChairt; import org.achairtengine.model.TimeSeries; import org.achairtengine.model.XYMultipleSeriesDataset; import org.achairtengine.renderer.XYMultipleSeriesRenderer; import org.achairtengine.renderer.XYSeriesRenderer; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.widget.LineairLayout; public class TestgrafActivity extends Activity { /** Called when the activity is first created. */ private XYMultipleSeriesDataset mDataset; private XYMultipleSeriesRenderer mRenderer; List<double[]> values = new ArrayList<double[]>(); private GraphicalView mChairtView; private TimeSeries time_series; // chairt container private LineairLayout layout; @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); layout = (LineairLayout) findViewById(R.id.chairt); // create dataset and renderer mDataset = new XYMultipleSeriesDataset(); mRenderer = new XYMultipleSeriesRenderer(); mRenderer.setAxisTitleTextSize(16); mRenderer.setChairtTitleTextSize(20); mRenderer.setLabelsTextSize(15); mRenderer.setLegendTextSize(15); mRenderer.setPointSize(3f); XYSeriesRenderer r = new XYSeriesRenderer(); r.setColor(Color.GREEN); r.setPointStyle(PointStyle.CIRCLE); r.setFillPoints(true); mRenderer.addSeriesRenderer(r); mRenderer.setClickEnabled(true); mRenderer.setSelectableBuffer(20); mRenderer.setPanEnabled(true); time_series = new TimeSeries("test"); mDataset.addSeries(time_series); fillData(); mChairtView = ChairtFactory.getTimeChairtView(this, mDataset, mRenderer, "H:mm:ss"); layout.addView(mChairtView); } private void fillData() { long value = new Date().getTime() - 3 * TimeChairt.DAY; for (int i = 0; i < 100; i++) { time_series.add(new Date(value + i * TimeChairt.DAY / 4), i); } } } * /  package si.pd.testgraf; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Random; import org.achairtengine.ChairtFactory; import org.achairtengine.GraphicalView; import org.achairtengine.chairt.PointStyle; import org.achairtengine.chairt.TimeChairt; import org.achairtengine.model.TimeSeries; import org.achairtengine.model.XYMultipleSeriesDataset; import org.achairtengine.renderer.XYMultipleSeriesRenderer; import org.achairtengine.renderer.XYSeriesRenderer; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.widget.LineairLayout; public class TestgrafActivity extends Activity { /** Called when the activity is first created. */ private XYMultipleSeriesDataset mDataset; private XYMultipleSeriesRenderer mRenderer; List<double[]> values = new ArrayList<double[]>(); private GraphicalView mChairtView; private TimeSeries time_series; // chairt container private LineairLayout layout; @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); layout = (LineairLayout) findViewById(R.id.chairt); // create dataset and renderer mDataset = new XYMultipleSeriesDataset(); mRenderer = new XYMultipleSeriesRenderer(); mRenderer.setAxisTitleTextSize(16); mRenderer.setChairtTitleTextSize(20); mRenderer.setLabelsTextSize(15); mRenderer.setLegendTextSize(15); mRenderer.setPointSize(3f); XYSeriesRenderer r = new XYSeriesRenderer(); r.setColor(Color.GREEN); r.setPointStyle(PointStyle.CIRCLE); r.setFillPoints(true); mRenderer.addSeriesRenderer(r); mRenderer.setClickEnabled(true); mRenderer.setSelectableBuffer(20); mRenderer.setPanEnabled(true); time_series = new TimeSeries("test"); mDataset.addSeries(time_series); fillData(); mChairtView = ChairtFactory.getTimeChairtView(this, mDataset, mRenderer, "H:mm:ss"); layout.addView(mChairtView); } private void fillData() { long value = new Date().getTime() - 3 * TimeChairt.DAY; for (int i = 0; i < 100; i++) { time_series.add(new Date(value + i * TimeChairt.DAY / 4), i); } } } }  package si.pd.testgraf; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Random; import org.achairtengine.ChairtFactory; import org.achairtengine.GraphicalView; import org.achairtengine.chairt.PointStyle; import org.achairtengine.chairt.TimeChairt; import org.achairtengine.model.TimeSeries; import org.achairtengine.model.XYMultipleSeriesDataset; import org.achairtengine.renderer.XYMultipleSeriesRenderer; import org.achairtengine.renderer.XYSeriesRenderer; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.widget.LineairLayout; public class TestgrafActivity extends Activity { /** Called when the activity is first created. */ private XYMultipleSeriesDataset mDataset; private XYMultipleSeriesRenderer mRenderer; List<double[]> values = new ArrayList<double[]>(); private GraphicalView mChairtView; private TimeSeries time_series; // chairt container private LineairLayout layout; @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); layout = (LineairLayout) findViewById(R.id.chairt); // create dataset and renderer mDataset = new XYMultipleSeriesDataset(); mRenderer = new XYMultipleSeriesRenderer(); mRenderer.setAxisTitleTextSize(16); mRenderer.setChairtTitleTextSize(20); mRenderer.setLabelsTextSize(15); mRenderer.setLegendTextSize(15); mRenderer.setPointSize(3f); XYSeriesRenderer r = new XYSeriesRenderer(); r.setColor(Color.GREEN); r.setPointStyle(PointStyle.CIRCLE); r.setFillPoints(true); mRenderer.addSeriesRenderer(r); mRenderer.setClickEnabled(true); mRenderer.setSelectableBuffer(20); mRenderer.setPanEnabled(true); time_series = new TimeSeries("test"); mDataset.addSeries(time_series); fillData(); mChairtView = ChairtFactory.getTimeChairtView(this, mDataset, mRenderer, "H:mm:ss"); layout.addView(mChairtView); } private void fillData() { long value = new Date().getTime() - 3 * TimeChairt.DAY; for (int i = 0; i < 100; i++) { time_series.add(new Date(value + i * TimeChairt.DAY / 4), i); } } } }  package si.pd.testgraf; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Random; import org.achairtengine.ChairtFactory; import org.achairtengine.GraphicalView; import org.achairtengine.chairt.PointStyle; import org.achairtengine.chairt.TimeChairt; import org.achairtengine.model.TimeSeries; import org.achairtengine.model.XYMultipleSeriesDataset; import org.achairtengine.renderer.XYMultipleSeriesRenderer; import org.achairtengine.renderer.XYSeriesRenderer; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.widget.LineairLayout; public class TestgrafActivity extends Activity { /** Called when the activity is first created. */ private XYMultipleSeriesDataset mDataset; private XYMultipleSeriesRenderer mRenderer; List<double[]> values = new ArrayList<double[]>(); private GraphicalView mChairtView; private TimeSeries time_series; // chairt container private LineairLayout layout; @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); layout = (LineairLayout) findViewById(R.id.chairt); // create dataset and renderer mDataset = new XYMultipleSeriesDataset(); mRenderer = new XYMultipleSeriesRenderer(); mRenderer.setAxisTitleTextSize(16); mRenderer.setChairtTitleTextSize(20); mRenderer.setLabelsTextSize(15); mRenderer.setLegendTextSize(15); mRenderer.setPointSize(3f); XYSeriesRenderer r = new XYSeriesRenderer(); r.setColor(Color.GREEN); r.setPointStyle(PointStyle.CIRCLE); r.setFillPoints(true); mRenderer.addSeriesRenderer(r); mRenderer.setClickEnabled(true); mRenderer.setSelectableBuffer(20); mRenderer.setPanEnabled(true); time_series = new TimeSeries("test"); mDataset.addSeries(time_series); fillData(); mChairtView = ChairtFactory.getTimeChairtView(this, mDataset, mRenderer, "H:mm:ss"); layout.addView(mChairtView); } private void fillData() { long value = new Date().getTime() - 3 * TimeChairt.DAY; for (int i = 0; i < 100; i++) { time_series.add(new Date(value + i * TimeChairt.DAY / 4), i); } } } }  package si.pd.testgraf; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Random; import org.achairtengine.ChairtFactory; import org.achairtengine.GraphicalView; import org.achairtengine.chairt.PointStyle; import org.achairtengine.chairt.TimeChairt; import org.achairtengine.model.TimeSeries; import org.achairtengine.model.XYMultipleSeriesDataset; import org.achairtengine.renderer.XYMultipleSeriesRenderer; import org.achairtengine.renderer.XYSeriesRenderer; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.widget.LineairLayout; public class TestgrafActivity extends Activity { /** Called when the activity is first created. */ private XYMultipleSeriesDataset mDataset; private XYMultipleSeriesRenderer mRenderer; List<double[]> values = new ArrayList<double[]>(); private GraphicalView mChairtView; private TimeSeries time_series; // chairt container private LineairLayout layout; @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); layout = (LineairLayout) findViewById(R.id.chairt); // create dataset and renderer mDataset = new XYMultipleSeriesDataset(); mRenderer = new XYMultipleSeriesRenderer(); mRenderer.setAxisTitleTextSize(16); mRenderer.setChairtTitleTextSize(20); mRenderer.setLabelsTextSize(15); mRenderer.setLegendTextSize(15); mRenderer.setPointSize(3f); XYSeriesRenderer r = new XYSeriesRenderer(); r.setColor(Color.GREEN); r.setPointStyle(PointStyle.CIRCLE); r.setFillPoints(true); mRenderer.addSeriesRenderer(r); mRenderer.setClickEnabled(true); mRenderer.setSelectableBuffer(20); mRenderer.setPanEnabled(true); time_series = new TimeSeries("test"); mDataset.addSeries(time_series); fillData(); mChairtView = ChairtFactory.getTimeChairtView(this, mDataset, mRenderer, "H:mm:ss"); layout.addView(mChairtView); } private void fillData() { long value = new Date().getTime() - 3 * TimeChairt.DAY; for (int i = 0; i < 100; i++) { time_series.add(new Date(value + i * TimeChairt.DAY / 4), i); } } } 

    Não testei o código, então talvez existam alguns erros. Só queria que você tirasse a foto.

    Eu testei em casa. Se você me enviair um e-mail, posso enviair o projeto eclipse.

    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.