Search in sources :

Example 1 with CombinedXYChart

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

the class ChartFactory method getCombinedXYChartIntent.

/**
 * Creates a combined XY 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 types the chart types (cannot be null)
 * @param activityTitle the graphical chart activity title
 * @return a combined XY chart intent
 * @throws IllegalArgumentException if dataset is null or renderer is null or
 *           if a dataset number of items is different than the number of
 *           series renderers or number of chart types
 */
public static final Intent getCombinedXYChartIntent(Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, String[] types, String activityTitle) {
    if (dataset == null || renderer == null || types == null || dataset.getSeriesCount() != types.length) {
        throw new IllegalArgumentException("Datasets, renderers and types should be not null and the datasets series count should be equal to the types length");
    }
    checkParameters(dataset, renderer);
    Intent intent = new Intent(context, GraphicalActivity.class);
    CombinedXYChart chart = new CombinedXYChart(dataset, renderer, types);
    intent.putExtra(CHART, chart);
    intent.putExtra(TITLE, activityTitle);
    return intent;
}
Also used : CombinedXYChart(org.achartengine.chart.CombinedXYChart) Intent(android.content.Intent)

Example 2 with CombinedXYChart

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

the class ChartFactory method getCombinedXYChartView.

/**
 * Creates a combined XY 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 types the chart types (cannot be null)
 * @return a combined XY chart graphical view
 * @throws IllegalArgumentException if dataset is null or renderer is null or
 *           if a dataset number of items is different than the number of
 *           series renderers or number of chart types
 */
public static final GraphicalView getCombinedXYChartView(Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, String[] types) {
    if (dataset == null || renderer == null || types == null || dataset.getSeriesCount() != types.length) {
        throw new IllegalArgumentException("Dataset, renderer and types should be not null and the datasets series count should be equal to the types length");
    }
    checkParameters(dataset, renderer);
    CombinedXYChart chart = new CombinedXYChart(dataset, renderer, types);
    return new GraphicalView(context, chart);
}
Also used : CombinedXYChart(org.achartengine.chart.CombinedXYChart)

Example 3 with CombinedXYChart

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

the class ChartFactory method getCombinedXYChartIntent.

/**
 * Creates a combined XY 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 types the chart types (cannot be null)
 * @param activityTitle the graphical chart activity title
 * @return a combined XY chart intent
 * @throws IllegalArgumentException if dataset is null or renderer is null or
 *           if a dataset number of items is different than the number of
 *           series renderers or number of chart types
 */
public static final Intent getCombinedXYChartIntent(Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, String[] types, String activityTitle) {
    if (dataset == null || renderer == null || types == null || dataset.getSeriesCount() != types.length) {
        throw new IllegalArgumentException("Datasets, renderers and types should be not null and the datasets series count should be equal to the types length");
    }
    checkParameters(dataset, renderer);
    Intent intent = new Intent(context, GraphicalActivity.class);
    CombinedXYChart chart = new CombinedXYChart(dataset, renderer, types);
    intent.putExtra(CHART, chart);
    intent.putExtra(TITLE, activityTitle);
    return intent;
}
Also used : CombinedXYChart(org.achartengine.chart.CombinedXYChart) Intent(android.content.Intent)

Example 4 with CombinedXYChart

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

the class ChartFactory method getCombinedXYChartView.

/**
 * Creates a combined XY 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 types the chart types (cannot be null)
 * @return a combined XY chart graphical view
 * @throws IllegalArgumentException if dataset is null or renderer is null or
 *           if a dataset number of items is different than the number of
 *           series renderers or number of chart types
 */
public static final GraphicalView getCombinedXYChartView(Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, String[] types) {
    if (dataset == null || renderer == null || types == null || dataset.getSeriesCount() != types.length) {
        throw new IllegalArgumentException("Dataset, renderer and types should be not null and the datasets series count should be equal to the types length");
    }
    checkParameters(dataset, renderer);
    CombinedXYChart chart = new CombinedXYChart(dataset, renderer, types);
    return new GraphicalView(context, chart);
}
Also used : CombinedXYChart(org.achartengine.chart.CombinedXYChart)

Aggregations

CombinedXYChart (org.achartengine.chart.CombinedXYChart)4 Intent (android.content.Intent)2