# Class ChartImage

java.lang.Object
net.sf.statcvs.charts.ChartImage

public class ChartImage extends Object
An image file for a chart. TODO: Better integrate all charts with ReportConfig

Version:
  $Id: ChartImage.java,v 1.9 2009/03/14 11:08:35 benoitx Exp $
Author:
  jentzsch, Richard Cyganiak (richard@cyganiak.de)

## Field Summary

Fields
Modifier and Type
Field
Description
`static final Color`
`BACKGROUND_COLOR`
`static final Color`
`PLOT_COLOR`

## Constructor Summary

Constructors
Constructor
Description
`ChartImage(String rootDirectory, String fileName, String title, org.jfree.chart.JFreeChart chart, Dimension size)`
Creates a new ChartFile.

## Method Summary

Modifier and Type
Method
Description
`String`
`getFullTitle()`
Returns the chart's title.
`int`
`getHeight()`
Returns the chart's height in pixels.
`String`
`getURL()`
Returns the chart's URL, relative to the report root.
`int`
`getWidth()`
Returns the chart's width in pixels.
`void`
`write()`
Writes the chart to disk as a PNG file.

### Methods inherited from class Object

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

## Field Details

### BACKGROUND_COLOR

public static final Color BACKGROUND_COLOR

### PLOT_COLOR

public static final Color PLOT_COLOR

## Constructor Details

### ChartImage

public ChartImage(String rootDirectory, String fileName, String title, org.jfree.chart.JFreeChart chart, Dimension size)
Creates a new ChartFile.

Parameters:
  `rootDirectory` - The report root directory with trailing slash
  `fileName` - The relative file name for the chart, with .png extension
  `title` - The chart's title
  `chart` - The JFreeChart object to save as a file
  `size` - width and height of the chart in pixels

## Method Details

### write

public void write()
Writes the chart to disk as a PNG file.

### getURL

public String getURL()
Returns the chart's URL, relative to the report root.

### getFullTitle

public String getFullTitle()
Returns the chart's title.

### getWidth

public int getWidth()
Returns the chart's width in pixels.

### getHeight

public int getHeight()
Returns the chart's height in pixels.