Module org.jfree.chart3d
Package org.jfree.chart3d

# Class Chart3DFactory

java.lang.Object
org.jfree.chart3d.Chart3DFactory

public class Chart3DFactory extends Object
Utility methods for constructing common chart types. Charts can be assembled piece-wise, but usually it is simpler to use the methods in this class then customise the resulting chart as necessary.

## Method Summary

Modifier and Type
Method
Description
`static Chart3D`
`createAreaChart(String title, String subtitle, CategoryDataset3D dataset, String rowAxisLabel, String columnAxisLabel, String valueAxisLabel)`
Creates and returns an area chart based on the supplied dataset.
`static Chart3D`
`createBarChart(String title, String subtitle, CategoryDataset3D dataset, String rowAxisLabel, String columnAxisLabel, String valueAxisLabel)`
Creates and returns a bar chart based on the supplied dataset.
`static Chart3D`
`createLineChart(String title, String subtitle, CategoryDataset3D dataset, String rowAxisLabel, String columnAxisLabel, String valueAxisLabel)`
Creates and returns a line chart based on the supplied dataset.
`static Chart3D`
`createPieChart(String title, String subtitle, PieDataset3D<? extends Comparable> dataset)`
Creates and returns a pie chart based on the supplied dataset.
`static Chart3D`
`createScatterChart(String title, String subtitle, XYZDataset dataset, String xAxisLabel, String yAxisLabel, String zAxisLabel)`
Creates and returns a scatter plot based on the supplied dataset (containing one or more series of `(x, y, z)` values).
`static Chart3D`
`createStackedBarChart(String title, String subtitle, CategoryDataset3D dataset, String rowAxisLabel, String columnAxisLabel, String valueAxisLabel)`
Creates and returns a stacked bar chart based on the supplied dataset.
`static Chart3D`
`createSurfaceChart(String title, String subtitle, Function3D function, String xAxisLabel, String yAxisLabel, String zAxisLabel)`
Creates a surface chart for the specified function.
`static Chart3D`
`createXYZBarChart(String title, String subtitle, XYZDataset dataset, String xAxisLabel, String yAxisLabel, String zAxisLabel)`
Creates and returns a bar chart based on the supplied dataset (this is for special cases, most general cases will be covered by the `createBarChart(String, String, CategoryDataset3D, String, String, String)` method).
`static Chart3D`
`createXYZLineChart(String title, String subtitle, XYZDataset dataset, String xAxisLabel, String yAxisLabel, String zAxisLabel)`
Creates and returns a line chart based on the supplied dataset.
`static ChartStyle`
`getDefaultChartStyle()`
Returns a new instance of the default chart style (so that, by default, all charts will have an independent style instance).
`static void`
`setDefaultChartStyle(ChartStyle style)`
Sets the style that will be used when creating new charts.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### getDefaultChartStyle

public static ChartStyle getDefaultChartStyle()
Returns a new instance of the default chart style (so that, by default, all charts will have an independent style instance).

Returns:
  The default chart style (never `null`).
Since:
  1.2

### setDefaultChartStyle

public static void setDefaultChartStyle(ChartStyle style)
Sets the style that will be used when creating new charts.

Parameters:
  `style` - the style (`null` not permitted).
Since:
  1.2

### createPieChart

public static Chart3D createPieChart(String title, String subtitle, PieDataset3D<? extends Comparable> dataset)
Creates and returns a pie chart based on the supplied dataset. The chart returned by this method will be constructed using a `PiePlot3D` instance (so it is safe to cast the result of `chart.getPlot()`).
For reference, here is a sample pie chart:

Parameters:
  `title` - the chart title (`null` permitted).
  `subtitle` - the chart subtitle (`null` permitted).
  `dataset` - the dataset (`null` not permitted).
Returns:
  A pie chart (never `null`).

### createBarChart

public static Chart3D createBarChart(String title, String subtitle, CategoryDataset3D dataset, String rowAxisLabel, String columnAxisLabel, String valueAxisLabel)
Creates and returns a bar chart based on the supplied dataset. The chart returned by this method will be constructed with a `CategoryPlot3D` using a `BarRenderer3D` (so it is safe to cast the plot and/or renderer to customise attributes that are specific to those subclasses).
For reference, here is a sample bar chart:

Parameters:
  `title` - the chart title (`null` permitted).
  `subtitle` - the chart subtitle (`null` permitted).
  `dataset` - the dataset (`null` not permitted).
  `rowAxisLabel` - the row axis label (`null` permitted).
  `columnAxisLabel` - the column axis label (`null` permitted).
  `valueAxisLabel` - the value axis label (`null` permitted).
Returns:
  A bar chart (never `null`).

### createStackedBarChart

public static Chart3D createStackedBarChart(String title, String subtitle, CategoryDataset3D dataset, String rowAxisLabel, String columnAxisLabel, String valueAxisLabel)
Creates and returns a stacked bar chart based on the supplied dataset. The chart returned by this method will be constructed with a `CategoryPlot3D` using a `StackedBarRenderer3D` (so it is safe to cast the plot and/or renderer to customise attributes that are specific to those subclasses).
For reference, here is a sample stacked bar chart:

Parameters:
  `title` - the chart title (`null` permitted).
  `subtitle` - the chart subtitle (`null` permitted).
  `dataset` - the dataset (`null` not permitted).
  `rowAxisLabel` - the row axis label (`null` permitted).
  `columnAxisLabel` - the column axis label (`null` permitted).
  `valueAxisLabel` - the value axis label (`null` permitted).
Returns:
  A stacked bar chart (never `null`).

### createAreaChart

public static Chart3D createAreaChart(String title, String subtitle, CategoryDataset3D dataset, String rowAxisLabel, String columnAxisLabel, String valueAxisLabel)
Creates and returns an area chart based on the supplied dataset. The chart returned by this method will be constructed with a `CategoryPlot3D` using an `AreaRenderer3D` (so it is safe to cast the plot and/or renderer to customise attributes that are specific to those subclasses).
For reference, here is a sample area chart:

Parameters:
  `title` - the chart title (`null` permitted).
  `subtitle` - the chart subtitle (`null` permitted).
  `dataset` - the dataset (`null` not permitted).
  `rowAxisLabel` - the row axis label (`null` permitted).
  `columnAxisLabel` - the column axis label (`null` permitted).
  `valueAxisLabel` - the value axis label (`null` permitted).
Returns:
  An area chart (never `null`).

### createLineChart

public static Chart3D createLineChart(String title, String subtitle, CategoryDataset3D dataset, String rowAxisLabel, String columnAxisLabel, String valueAxisLabel)
Creates and returns a line chart based on the supplied dataset. The chart returned by this method will be constructed with a `CategoryPlot3D` using a `LineRenderer3D` (so it is safe to cast the plot and/or renderer to customise attributes that are specific to those subclasses).
For reference, here is a sample line chart:

Parameters:
  `title` - the chart title (`null` permitted).
  `subtitle` - the chart subtitle (`null` permitted).
  `dataset` - the dataset (`null` not permitted).
  `rowAxisLabel` - the row axis label (`null` permitted).
  `columnAxisLabel` - the column axis label (`null` permitted).
  `valueAxisLabel` - the value axis label (`null` permitted).
Returns:
  A line chart (never `null`).

### createScatterChart

public static Chart3D createScatterChart(String title, String subtitle, XYZDataset dataset, String xAxisLabel, String yAxisLabel, String zAxisLabel)
Creates and returns a scatter plot based on the supplied dataset (containing one or more series of `(x, y, z)` values). The chart returned by this method will be constructed with an `XYZPlot` using a `ScatterXYZRenderer` (so it is safe to cast the plot and/or renderer to customise attributes that are specific to those subclasses).
For reference, here is a sample scatter chart:

Parameters:
  `title` - the chart title (`null` permitted).
  `subtitle` - the chart subtitle (`null` permitted).
  `dataset` - the dataset (`null` not permitted).
  `xAxisLabel` - the x-axis label (`null` permitted).
  `yAxisLabel` - the y-axis label (`null` permitted).
  `zAxisLabel` - the z-axis label (`null` permitted).
Returns:
  The chart.

### createSurfaceChart

public static Chart3D createSurfaceChart(String title, String subtitle, Function3D function, String xAxisLabel, String yAxisLabel, String zAxisLabel)
Creates a surface chart for the specified function.
For reference, here is a sample surface chart:

Parameters:
  `title` - the chart title (`null` permitted).
  `subtitle` - the chart subtitle (`null` permitted).
  `function` - the function (`null` not permitted).
  `xAxisLabel` - the x-axis label (`null` permitted).
  `yAxisLabel` - the y-axis label (`null` permitted).
  `zAxisLabel` - the z-axis label (`null` permitted).
Returns:
  The chart.
Since:
  1.1

### createXYZBarChart

public static Chart3D createXYZBarChart(String title, String subtitle, XYZDataset dataset, String xAxisLabel, String yAxisLabel, String zAxisLabel)
Creates and returns a bar chart based on the supplied dataset (this is for special cases, most general cases will be covered by the `createBarChart(String, String, CategoryDataset3D, String, String, String)` method). The chart returned by this method will be constructed with an `XYZPlot` using a `BarXYZRenderer` (so it is safe to cast the plot and/or renderer to customise attributes that are specific to those subclasses).
For reference, here is a sample XYZ bar chart:

Parameters:
  `title` - the chart title (`null` permitted).
  `subtitle` - the chart subtitle (`null` permitted).
  `dataset` - the dataset (`null` not permitted).
  `xAxisLabel` - the x-axis label (`null` permitted).
  `yAxisLabel` - the y-axis label (`null` permitted).
  `zAxisLabel` - the z-axis label (`null` permitted).
Returns:
  The chart.

### createXYZLineChart

public static Chart3D createXYZLineChart(String title, String subtitle, XYZDataset dataset, String xAxisLabel, String yAxisLabel, String zAxisLabel)
Creates and returns a line chart based on the supplied dataset. The chart returned by this method will be constructed with an `XYZPlot` using a `LineXYZRenderer` (so it is safe to cast the plot and/or renderer to customise attributes that are specific to those subclasses).

Parameters:
  `title` - the chart title (`null` permitted).
  `subtitle` - the chart subtitle (`null` permitted).
  `dataset` - the dataset (`null` not permitted).
  `xAxisLabel` - the x-axis label (`null` permitted).
  `yAxisLabel` - the y-axis label (`null` permitted).
  `zAxisLabel` - the z-axis label (`null` permitted).
Returns:
  The chart.
Since:
  1.5