org.achartengine
Class ChartFactory

java.lang.Object
  extended by org.achartengine.ChartFactory

public class ChartFactory
extends java.lang.Object

Utility methods for creating chart views or intents.


Field Summary
static java.lang.String CHART
          The key for the chart data.
static java.lang.String TITLE
          The key for the chart graphical activity title.
 
Method Summary
static android.content.Intent getBarChartIntent(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, BarChart.Type type)
          Creates a bar chart intent that can be used to start the graphical view activity.
static android.content.Intent getBarChartIntent(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, BarChart.Type type, java.lang.String activityTitle)
          Creates a bar chart intent that can be used to start the graphical view activity.
static GraphicalView getBarChartView(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, BarChart.Type type)
          Creates a bar chart view.
static android.content.Intent getBubbleChartIntent(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer)
          Creates a bubble chart intent that can be used to start the graphical view activity.
static android.content.Intent getBubbleChartIntent(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, java.lang.String activityTitle)
          Creates a bubble chart intent that can be used to start the graphical view activity.
static GraphicalView getBubbleChartView(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer)
          Creates a bubble chart view.
static android.content.Intent getCombinedXYChartIntent(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, java.lang.String[] types, java.lang.String activityTitle)
          Creates a combined XY chart intent that can be used to start the graphical view activity.
static GraphicalView getCombinedXYChartView(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, java.lang.String[] types)
          Creates a combined XY chart view.
static GraphicalView getCubeLineChartView(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, float smoothness)
          Creates a cubic line chart view.
static android.content.Intent getCubicLineChartIntent(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, float smoothness)
          Creates a cubic line chart intent that can be used to start the graphical view activity.
static android.content.Intent getCubicLineChartIntent(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, float smoothness, java.lang.String activityTitle)
          Creates a line chart intent that can be used to start the graphical view activity.
static android.content.Intent getDialChartIntent(android.content.Context context, CategorySeries dataset, DialRenderer renderer, java.lang.String activityTitle)
          Creates a dial chart intent that can be used to start the graphical view activity.
static GraphicalView getDialChartView(android.content.Context context, CategorySeries dataset, DialRenderer renderer)
          Creates a dial chart view that can be used to start the graphical view activity.
static android.content.Intent getDoughnutChartIntent(android.content.Context context, MultipleCategorySeries dataset, DefaultRenderer renderer, java.lang.String activityTitle)
          Creates a doughnut chart intent that can be used to start the graphical view activity.
static GraphicalView getDoughnutChartView(android.content.Context context, MultipleCategorySeries dataset, DefaultRenderer renderer)
          Creates a doughnut chart view that can be used to start the graphical view activity.
static android.content.Intent getLineChartIntent(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer)
          Creates a line chart intent that can be used to start the graphical view activity.
static android.content.Intent getLineChartIntent(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, java.lang.String activityTitle)
          Creates a line chart intent that can be used to start the graphical view activity.
static GraphicalView getLineChartView(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer)
          Creates a line chart view.
static android.content.Intent getPieChartIntent(android.content.Context context, CategorySeries dataset, DefaultRenderer renderer, java.lang.String activityTitle)
          Creates a pie chart intent that can be used to start the graphical view activity.
static GraphicalView getPieChartView(android.content.Context context, CategorySeries dataset, DefaultRenderer renderer)
          Creates a pie chart view that can be used to start the graphical view activity.
static android.content.Intent getRangeBarChartIntent(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, BarChart.Type type, java.lang.String activityTitle)
          Creates a range bar chart intent that can be used to start the graphical view activity.
static GraphicalView getRangeBarChartView(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, BarChart.Type type)
          Creates a range bar chart view.
static android.content.Intent getScatterChartIntent(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer)
          Creates a scatter chart intent that can be used to start the graphical view activity.
static android.content.Intent getScatterChartIntent(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, java.lang.String activityTitle)
          Creates a scatter chart intent that can be used to start the graphical view activity.
static GraphicalView getScatterChartView(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer)
          Creates a scatter chart view.
static android.content.Intent getTimeChartIntent(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, java.lang.String format)
          Creates a time chart intent that can be used to start the graphical view activity.
static android.content.Intent getTimeChartIntent(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, java.lang.String format, java.lang.String activityTitle)
          Creates a time chart intent that can be used to start the graphical view activity.
static GraphicalView getTimeChartView(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, java.lang.String format)
          Creates a time chart view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHART

public static final java.lang.String CHART
The key for the chart data.

See Also:
Constant Field Values

TITLE

public static final java.lang.String TITLE
The key for the chart graphical activity title.

See Also:
Constant Field Values
Method Detail

getLineChartView

public static final GraphicalView getLineChartView(android.content.Context context,
                                                   XYMultipleSeriesDataset dataset,
                                                   XYMultipleSeriesRenderer renderer)
Creates a line chart view.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
Returns:
a line chart graphical view
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getCubeLineChartView

public static final GraphicalView getCubeLineChartView(android.content.Context context,
                                                       XYMultipleSeriesDataset dataset,
                                                       XYMultipleSeriesRenderer renderer,
                                                       float smoothness)
Creates a cubic line chart view.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
Returns:
a line chart graphical view
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getScatterChartView

public static final GraphicalView getScatterChartView(android.content.Context context,
                                                      XYMultipleSeriesDataset dataset,
                                                      XYMultipleSeriesRenderer renderer)
Creates a scatter chart view.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
Returns:
a scatter chart graphical view
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getBubbleChartView

public static final GraphicalView getBubbleChartView(android.content.Context context,
                                                     XYMultipleSeriesDataset dataset,
                                                     XYMultipleSeriesRenderer renderer)
Creates a bubble chart view.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
Returns:
a scatter chart graphical view
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getTimeChartView

public static final GraphicalView getTimeChartView(android.content.Context context,
                                                   XYMultipleSeriesDataset dataset,
                                                   XYMultipleSeriesRenderer renderer,
                                                   java.lang.String format)
Creates a time chart view.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
format - the date format pattern to be used for displaying the X axis date labels. If null, a default appropriate format will be used.
Returns:
a time chart graphical view
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getBarChartView

public static final GraphicalView getBarChartView(android.content.Context context,
                                                  XYMultipleSeriesDataset dataset,
                                                  XYMultipleSeriesRenderer renderer,
                                                  BarChart.Type type)
Creates a bar chart view.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
type - the bar chart type
Returns:
a bar chart graphical view
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getRangeBarChartView

public static final GraphicalView getRangeBarChartView(android.content.Context context,
                                                       XYMultipleSeriesDataset dataset,
                                                       XYMultipleSeriesRenderer renderer,
                                                       BarChart.Type type)
Creates a range bar chart view.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
type - the range bar chart type
Returns:
a bar chart graphical view
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getCombinedXYChartView

public static final GraphicalView getCombinedXYChartView(android.content.Context context,
                                                         XYMultipleSeriesDataset dataset,
                                                         XYMultipleSeriesRenderer renderer,
                                                         java.lang.String[] types)
Creates a combined XY chart view.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
types - the chart types (cannot be null)
Returns:
a combined XY chart graphical view
Throws:
java.lang.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

getPieChartView

public static final GraphicalView getPieChartView(android.content.Context context,
                                                  CategorySeries dataset,
                                                  DefaultRenderer renderer)
Creates a pie chart view that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the category series dataset (cannot be null)
renderer - the series renderer (cannot be null)
Returns:
a pie chart view
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset number of items is different than the number of series renderers

getDialChartView

public static final GraphicalView getDialChartView(android.content.Context context,
                                                   CategorySeries dataset,
                                                   DialRenderer renderer)
Creates a dial chart view that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the category series dataset (cannot be null)
renderer - the dial renderer (cannot be null)
Returns:
a pie chart view
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset number of items is different than the number of series renderers

getDoughnutChartView

public static final GraphicalView getDoughnutChartView(android.content.Context context,
                                                       MultipleCategorySeries dataset,
                                                       DefaultRenderer renderer)
Creates a doughnut chart view that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple category series dataset (cannot be null)
renderer - the series renderer (cannot be null)
Returns:
a pie chart view
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset number of items is different than the number of series renderers

getLineChartIntent

public static final android.content.Intent getLineChartIntent(android.content.Context context,
                                                              XYMultipleSeriesDataset dataset,
                                                              XYMultipleSeriesRenderer renderer)
Creates a line chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
Returns:
a line chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getCubicLineChartIntent

public static final android.content.Intent getCubicLineChartIntent(android.content.Context context,
                                                                   XYMultipleSeriesDataset dataset,
                                                                   XYMultipleSeriesRenderer renderer,
                                                                   float smoothness)
Creates a cubic line chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
Returns:
a line chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getScatterChartIntent

public static final android.content.Intent getScatterChartIntent(android.content.Context context,
                                                                 XYMultipleSeriesDataset dataset,
                                                                 XYMultipleSeriesRenderer renderer)
Creates a scatter chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
Returns:
a scatter chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getBubbleChartIntent

public static final android.content.Intent getBubbleChartIntent(android.content.Context context,
                                                                XYMultipleSeriesDataset dataset,
                                                                XYMultipleSeriesRenderer renderer)
Creates a bubble chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
Returns:
a scatter chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getTimeChartIntent

public static final android.content.Intent getTimeChartIntent(android.content.Context context,
                                                              XYMultipleSeriesDataset dataset,
                                                              XYMultipleSeriesRenderer renderer,
                                                              java.lang.String format)
Creates a time chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
format - the date format pattern to be used for displaying the X axis date labels. If null, a default appropriate format will be used.
Returns:
a time chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getBarChartIntent

public static final android.content.Intent getBarChartIntent(android.content.Context context,
                                                             XYMultipleSeriesDataset dataset,
                                                             XYMultipleSeriesRenderer renderer,
                                                             BarChart.Type type)
Creates a bar chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
type - the bar chart type
Returns:
a bar chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getLineChartIntent

public static final android.content.Intent getLineChartIntent(android.content.Context context,
                                                              XYMultipleSeriesDataset dataset,
                                                              XYMultipleSeriesRenderer renderer,
                                                              java.lang.String activityTitle)
Creates a line chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
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.
Returns:
a line chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getCubicLineChartIntent

public static final android.content.Intent getCubicLineChartIntent(android.content.Context context,
                                                                   XYMultipleSeriesDataset dataset,
                                                                   XYMultipleSeriesRenderer renderer,
                                                                   float smoothness,
                                                                   java.lang.String activityTitle)
Creates a line chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
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.
Returns:
a line chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getScatterChartIntent

public static final android.content.Intent getScatterChartIntent(android.content.Context context,
                                                                 XYMultipleSeriesDataset dataset,
                                                                 XYMultipleSeriesRenderer renderer,
                                                                 java.lang.String activityTitle)
Creates a scatter chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
activityTitle - the graphical chart activity title
Returns:
a scatter chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getBubbleChartIntent

public static final android.content.Intent getBubbleChartIntent(android.content.Context context,
                                                                XYMultipleSeriesDataset dataset,
                                                                XYMultipleSeriesRenderer renderer,
                                                                java.lang.String activityTitle)
Creates a bubble chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
activityTitle - the graphical chart activity title
Returns:
a scatter chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getTimeChartIntent

public static final android.content.Intent getTimeChartIntent(android.content.Context context,
                                                              XYMultipleSeriesDataset dataset,
                                                              XYMultipleSeriesRenderer renderer,
                                                              java.lang.String format,
                                                              java.lang.String activityTitle)
Creates a time chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
format - the date format pattern to be used for displaying the X axis date labels. If null, a default appropriate format will be used
activityTitle - the graphical chart activity title
Returns:
a time chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getBarChartIntent

public static final android.content.Intent getBarChartIntent(android.content.Context context,
                                                             XYMultipleSeriesDataset dataset,
                                                             XYMultipleSeriesRenderer renderer,
                                                             BarChart.Type type,
                                                             java.lang.String activityTitle)
Creates a bar chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
type - the bar chart type
activityTitle - the graphical chart activity title
Returns:
a bar chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getRangeBarChartIntent

public static final android.content.Intent getRangeBarChartIntent(android.content.Context context,
                                                                  XYMultipleSeriesDataset dataset,
                                                                  XYMultipleSeriesRenderer renderer,
                                                                  BarChart.Type type,
                                                                  java.lang.String activityTitle)
Creates a range bar chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
type - the range bar chart type
activityTitle - the graphical chart activity title
Returns:
a range bar chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset and the renderer don't include the same number of series

getCombinedXYChartIntent

public static final android.content.Intent getCombinedXYChartIntent(android.content.Context context,
                                                                    XYMultipleSeriesDataset dataset,
                                                                    XYMultipleSeriesRenderer renderer,
                                                                    java.lang.String[] types,
                                                                    java.lang.String activityTitle)
Creates a combined XY chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple series dataset (cannot be null)
renderer - the multiple series renderer (cannot be null)
types - the chart types (cannot be null)
activityTitle - the graphical chart activity title
Returns:
a combined XY chart intent
Throws:
java.lang.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

getPieChartIntent

public static final android.content.Intent getPieChartIntent(android.content.Context context,
                                                             CategorySeries dataset,
                                                             DefaultRenderer renderer,
                                                             java.lang.String activityTitle)
Creates a pie chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the category series dataset (cannot be null)
renderer - the series renderer (cannot be null)
activityTitle - the graphical chart activity title
Returns:
a pie chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset number of items is different than the number of series renderers

getDoughnutChartIntent

public static final android.content.Intent getDoughnutChartIntent(android.content.Context context,
                                                                  MultipleCategorySeries dataset,
                                                                  DefaultRenderer renderer,
                                                                  java.lang.String activityTitle)
Creates a doughnut chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the multiple category series dataset (cannot be null)
renderer - the series renderer (cannot be null)
activityTitle - the graphical chart activity title
Returns:
a pie chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset number of items is different than the number of series renderers

getDialChartIntent

public static final android.content.Intent getDialChartIntent(android.content.Context context,
                                                              CategorySeries dataset,
                                                              DialRenderer renderer,
                                                              java.lang.String activityTitle)
Creates a dial chart intent that can be used to start the graphical view activity.

Parameters:
context - the context
dataset - the category series dataset (cannot be null)
renderer - the dial renderer (cannot be null)
activityTitle - the graphical chart activity title
Returns:
a dial chart intent
Throws:
java.lang.IllegalArgumentException - if dataset is null or renderer is null or if the dataset number of items is different than the number of series renderers


Copyright © 2009 - 2011 4ViewSoft. All Rights Reserved.