Search in sources :

Example 21 with XYChart

use of org.achartengine.chart.XYChart in project sensorreadout by onyxbits.

the class ChartFactory method getLineChartView.

/**
   * Creates a line chart view.
   * 
   * @param context the context
   * @param dataset the multiple series dataset (cannot be null)
   * @param renderer the multiple series renderer (cannot be null)
   * @return a line chart graphical view
   * @throws IllegalArgumentException if dataset is null or renderer is null or
   *           if the dataset and the renderer don't include the same number of
   *           series
   */
public static final GraphicalView getLineChartView(Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer) {
    checkParameters(dataset, renderer);
    XYChart chart = new LineChart(dataset, renderer);
    return new GraphicalView(context, chart);
}
Also used : XYChart(org.achartengine.chart.XYChart) CombinedXYChart(org.achartengine.chart.CombinedXYChart) LineChart(org.achartengine.chart.LineChart) CubicLineChart(org.achartengine.chart.CubicLineChart)

Example 22 with XYChart

use of org.achartengine.chart.XYChart in project sensorreadout by onyxbits.

the class ChartFactory method getBarChartView.

/**
   * Creates a bar chart view.
   * 
   * @param context the context
   * @param dataset the multiple series dataset (cannot be null)
   * @param renderer the multiple series renderer (cannot be null)
   * @param type the bar chart type
   * @return a bar chart graphical view
   * @throws IllegalArgumentException if dataset is null or renderer is null or
   *           if the dataset and the renderer don't include the same number of
   *           series
   */
public static final GraphicalView getBarChartView(Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, Type type) {
    checkParameters(dataset, renderer);
    XYChart chart = new BarChart(dataset, renderer, type);
    return new GraphicalView(context, chart);
}
Also used : RangeBarChart(org.achartengine.chart.RangeBarChart) BarChart(org.achartengine.chart.BarChart) XYChart(org.achartengine.chart.XYChart) CombinedXYChart(org.achartengine.chart.CombinedXYChart)

Example 23 with XYChart

use of org.achartengine.chart.XYChart in project Anki-Android by Ramblurr.

the class ChartFactory method getLineChartIntent.

/**
   * Creates a line chart intent that can be used to start the graphical view
   * activity.
   * 
   * @param context the context
   * @param dataset the multiple series dataset (cannot be null)
   * @param renderer the multiple series renderer (cannot be null)
   * @param activityTitle the graphical chart activity title. If this is null,
   *          then the title bar will be hidden. If a blank title is passed in,
   *          then the title bar will be the default. Pass in any other string
   *          to set a custom title.
   * @return a line chart intent
   * @throws IllegalArgumentException if dataset is null or renderer is null or
   *           if the dataset and the renderer don't include the same number of
   *           series
   */
public static final Intent getLineChartIntent(Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, String activityTitle) {
    checkParameters(dataset, renderer);
    Intent intent = new Intent(context, GraphicalActivity.class);
    XYChart chart = new LineChart(dataset, renderer);
    intent.putExtra(CHART, chart);
    intent.putExtra(TITLE, activityTitle);
    return intent;
}
Also used : XYChart(org.achartengine.chart.XYChart) CombinedXYChart(org.achartengine.chart.CombinedXYChart) Intent(android.content.Intent) LineChart(org.achartengine.chart.LineChart) CubicLineChart(org.achartengine.chart.CubicLineChart)

Example 24 with XYChart

use of org.achartengine.chart.XYChart in project Anki-Android by Ramblurr.

the class ChartFactory method getBubbleChartView.

/**
   * Creates a bubble chart view.
   * 
   * @param context the context
   * @param dataset the multiple series dataset (cannot be null)
   * @param renderer the multiple series renderer (cannot be null)
   * @return a scatter chart graphical view
   * @throws IllegalArgumentException if dataset is null or renderer is null or
   *           if the dataset and the renderer don't include the same number of
   *           series
   */
public static final GraphicalView getBubbleChartView(Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer) {
    checkParameters(dataset, renderer);
    XYChart chart = new BubbleChart(dataset, renderer);
    return new GraphicalView(context, chart);
}
Also used : BubbleChart(org.achartengine.chart.BubbleChart) XYChart(org.achartengine.chart.XYChart) CombinedXYChart(org.achartengine.chart.CombinedXYChart)

Example 25 with XYChart

use of org.achartengine.chart.XYChart in project Anki-Android by Ramblurr.

the class ChartFactory method getCubicLineChartIntent.

/**
   * Creates a line chart intent that can be used to start the graphical view
   * activity.
   * 
   * @param context the context
   * @param dataset the multiple series dataset (cannot be null)
   * @param renderer the multiple series renderer (cannot be null)
   * @param activityTitle the graphical chart activity title. If this is null,
   *          then the title bar will be hidden. If a blank title is passed in,
   *          then the title bar will be the default. Pass in any other string
   *          to set a custom title.
   * @return a line chart intent
   * @throws IllegalArgumentException if dataset is null or renderer is null or
   *           if the dataset and the renderer don't include the same number of
   *           series
   */
public static final Intent getCubicLineChartIntent(Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, float smoothness, String activityTitle) {
    checkParameters(dataset, renderer);
    Intent intent = new Intent(context, GraphicalActivity.class);
    XYChart chart = new CubicLineChart(dataset, renderer, smoothness);
    intent.putExtra(CHART, chart);
    intent.putExtra(TITLE, activityTitle);
    return intent;
}
Also used : CubicLineChart(org.achartengine.chart.CubicLineChart) XYChart(org.achartengine.chart.XYChart) CombinedXYChart(org.achartengine.chart.CombinedXYChart) Intent(android.content.Intent)

Aggregations

XYChart (org.achartengine.chart.XYChart)26 CombinedXYChart (org.achartengine.chart.CombinedXYChart)20 Intent (android.content.Intent)8 CubicLineChart (org.achartengine.chart.CubicLineChart)8 RoundChart (org.achartengine.chart.RoundChart)6 BubbleChart (org.achartengine.chart.BubbleChart)4 LineChart (org.achartengine.chart.LineChart)4 RangeBarChart (org.achartengine.chart.RangeBarChart)4 ScatterChart (org.achartengine.chart.ScatterChart)4 DefaultRenderer (org.achartengine.renderer.DefaultRenderer)4 BarChart (org.achartengine.chart.BarChart)2 XYSeries (org.achartengine.model.XYSeries)2