com.googlecode.charts4j
Class GCharts

java.lang.Object
  extended by com.googlecode.charts4j.GCharts

public final class GCharts
extends Object

Static factory class for GChart hierarchy.

Author:
Julien Chastang (julien.c.chastang at gmail dot com)

Method Summary
static BarChart newBarChart(BarChartPlot... plots)
          Create a BarChart.
static BarChart newBarChart(List<? extends Plot> plots)
          Create a BarChart.
static BarChart newBarChart(Plot... plots)
          Create a BarChart.
static GoogleOMeter newGoogleOMeter(double data)
          Create a GoogleOMeter.
static GoogleOMeter newGoogleOMeter(double data, String label, Color... colors)
          Create a GoogleOMeter.
static GoogleOMeter newGoogleOMeter(double data, String label, List<? extends Color> colors)
          Create a GoogleOMeter.
static LineChart newLineChart(Line... plots)
          Create a LineChart.
static LineChart newLineChart(List<? extends Plot> plots)
          Create a LineChart.
static LineChart newLineChart(Plot... plots)
          Create a LineChart.
static MapChart newMapChart(GeographicalArea geographicalArea)
          Create a map chart with a GeographicalArea.
static PieChart newPieChart(List<? extends Slice> slices)
          Create a PieChart with the given pie slices.
static PieChart newPieChart(Slice... slices)
          Create a PieChart with the given pie slices.
static RadarChart newRadarChart(List<? extends Plot> plots)
          Create a RadarChart.
static RadarChart newRadarChart(Plot... plots)
          Create a RadarChart.
static RadarChart newRadarChart(RadarPlot... plots)
          Create a RadarChart.
static ScatterPlot newScatterPlot(Plot scatterPlotData)
          Create a ScatterPlot.
static ScatterPlot newScatterPlot(ScatterPlotData scatterPlotData)
          Create a ScatterPlot with the given scatter plot data.
static VennDiagram newVennDiagram(double circle1Size, double circle2Size, double circle3Size, double abIntersect, double bcIntersect, double caIntersect, double abcIntersect)
          Create a Venn Diagram.
static XYLineChart newXYLineChart(List<? extends Plot> plots)
          Create a XYLineChart with the given plots.
static XYLineChart newXYLineChart(Plot... plots)
          Create a XYLineChart with the given plots.
static XYLineChart newXYLineChart(XYLine... plots)
          Create a XYLineChart with the given XYLines.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newLineChart

public static LineChart newLineChart(Line... plots)
Create a LineChart. Supply this method with one or more Lines to be rendered by this chart.

Parameters:
plots - Lines to be rendered in this line chart. Cannot be null or contain a null.
Returns:
Line chart with the specified lines.
See Also:
Line, LineChart, Plots

newLineChart

public static LineChart newLineChart(Plot... plots)
Create a LineChart. Supply this method with one or more Plots to be rendered by this chart.

Parameters:
plots - Plots to be rendered in this line chart. Cannot be null or contain a null.
Returns:
Line chart with the specified plots.
See Also:
Plot, LineChart, Plots

newLineChart

public static LineChart newLineChart(List<? extends Plot> plots)
Create a LineChart. Supply this method with one or more Plots to be rendered by this chart.

Parameters:
plots - Plots to be rendered in this line chart. Cannot be null or contain a null.
Returns:
Line chart with the specified plots.
See Also:
Plot, LineChart, Plots

newRadarChart

public static RadarChart newRadarChart(RadarPlot... plots)
Create a RadarChart. Supply this method with one or more RadarPlots to be rendered by this chart.

Parameters:
plots - Radar plots to be rendered in this radar chart. Cannot be null or contain a null.
Returns:
Radar chart with the specified plots.
See Also:
RadarPlot, RadarChart, Plots

newRadarChart

public static RadarChart newRadarChart(Plot... plots)
Create a RadarChart. Supply this method with one or more Plots to be rendered by this chart.

Parameters:
plots - Radar plots to be rendered in this radar chart. Cannot be null or contain a null.
Returns:
Radar chart with the specified plots.
See Also:
Plot, RadarChart, Plots

newRadarChart

public static RadarChart newRadarChart(List<? extends Plot> plots)
Create a RadarChart. Supply this method with one or more Plots to be rendered by this chart.

Parameters:
plots - Radar plots to be rendered in this radar chart. Cannot be null or contain a null.
Returns:
Radar chart with the specified plots.
See Also:
Plot, RadarChart, Plots

newBarChart

public static BarChart newBarChart(BarChartPlot... plots)
Create a BarChart. Supply this method with one or more BarChartPlots to be rendered by this chart.

Parameters:
plots - Bar chart plots to be rendered in this bar chart. Cannot be null or contain null.
Returns:
Bar chart with the specified plots.
See Also:
BarChartPlot, BarChart, Plots

newBarChart

public static BarChart newBarChart(Plot... plots)
Create a BarChart. Supply this method with one or more Plots to be rendered by this chart.

Parameters:
plots - Plots to be rendered in this bar chart. Cannot be null or contain a null.
Returns:
Bar chart with the specified plots.
See Also:
Plot, BarChart, Plots

newBarChart

public static BarChart newBarChart(List<? extends Plot> plots)
Create a BarChart. Supply this method with one or more Plots to be rendered by this chart.

Parameters:
plots - Plots to be rendered in this bar chart. Cannot be null or contain a null.
Returns:
Bar chart with the specified plots.
See Also:
Plot, BarChart, Plots

newXYLineChart

public static XYLineChart newXYLineChart(XYLine... plots)
Create a XYLineChart with the given XYLines.

Parameters:
plots - XYLines to be rendered in this line chart. Cannot be null or contain a null.
Returns:
XYLine chart
See Also:
XYLine, Plots, XYLineChart

newXYLineChart

public static XYLineChart newXYLineChart(Plot... plots)
Create a XYLineChart with the given plots.

Parameters:
plots - Plots to be rendered in this line chart. Cannot be null or contain a null.
Returns:
XYLine chart
See Also:
XYLine, Plot, Plots, XYLineChart

newXYLineChart

public static XYLineChart newXYLineChart(List<? extends Plot> plots)
Create a XYLineChart with the given plots.

Parameters:
plots - Plots to be rendered in this line chart. Cannot be null or contain a null.
Returns:
XYLine chart
See Also:
XYLine, Plot, Plots, XYLineChart

newScatterPlot

public static ScatterPlot newScatterPlot(ScatterPlotData scatterPlotData)
Create a ScatterPlot with the given scatter plot data.

Parameters:
scatterPlotData - Scatter plot data to be rendered in this scatter plot. Cannot be null.
Returns:
Scatter plot
See Also:
ScatterPlotData, ScatterPlot

newScatterPlot

public static ScatterPlot newScatterPlot(Plot scatterPlotData)
Create a ScatterPlot.

Parameters:
scatterPlotData - Scatter plot data to be rendered in this scatter plot. Cannot be null.
Returns:
Scatter plot.
See Also:
ScatterPlotData, ScatterPlot

newPieChart

public static PieChart newPieChart(Slice... slices)
Create a PieChart with the given pie slices.

Parameters:
slices - Slices of the pie chart. Cannot be null or contain a null.
Returns:
Pie Chart
See Also:
Slice, PieChart

newPieChart

public static PieChart newPieChart(List<? extends Slice> slices)
Create a PieChart with the given pie slices.

Parameters:
slices - Slices of the pie chart. Cannot be null or contain a null.
Returns:
Pie chart.
See Also:
Slice, PieChart

newVennDiagram

public static VennDiagram newVennDiagram(double circle1Size,
                                         double circle2Size,
                                         double circle3Size,
                                         double abIntersect,
                                         double bcIntersect,
                                         double caIntersect,
                                         double abcIntersect)
Create a Venn Diagram. Please specify all parameters between 0 and 100.

Parameters:
circle1Size - the first three values specify the relative sizes of three circles, A, B, and C
circle2Size - the first three values specify the relative sizes of three circles, A, B, and C
circle3Size - the first three values specify the relative sizes of three circles, A, B, and C
abIntersect - the fourth value specifies the area of A intersecting B
bcIntersect - the fifth value specifies the area of B intersecting C
caIntersect - the sixth value specifies the area of C intersecting A
abcIntersect - the seventh value specifies the area of A intersecting B intersecting C
Returns:
a VennDiagram

newGoogleOMeter

public static GoogleOMeter newGoogleOMeter(double data)
Create a GoogleOMeter.

Parameters:
data - A number between 0 and 100.
Returns:
a GoogleOMeter

newGoogleOMeter

public static GoogleOMeter newGoogleOMeter(double data,
                                           String label,
                                           Color... colors)
Create a GoogleOMeter.

Parameters:
data - A number between 0 and 100.
label - Label that will appear at the top of the arrow. Cannot be null.
colors - Must provide at least two color. Colors will be interpolated between colors provided. Must supply at least two colors. Cannot be null.
Returns:
a GoogleOMeter

newGoogleOMeter

public static GoogleOMeter newGoogleOMeter(double data,
                                           String label,
                                           List<? extends Color> colors)
Create a GoogleOMeter.

Parameters:
data - A number between 0 and 100.
label - Label that will appear at the top of the arrow. Cannot be null.
colors - Must provide at least two color. Colors will be interpolated between colors provided. Must supply at least two colors. Cannot be null.
Returns:
a GoogleOMeter

newMapChart

public static MapChart newMapChart(GeographicalArea geographicalArea)
Create a map chart with a GeographicalArea.

Parameters:
geographicalArea - Pass in the GeographicalArea. Cannot be null.
Returns:
a MapChart
See Also:
GeographicalArea