87
ChartUtilities Class
- ChartUtilities class comes under the org.jfree.chart package of JFreeChart library.
- This class is also known as the ‘ChartUtils class’.
- Just like the ChartFactory class, this class has numerous static methods.
- Most of the methods present in this class handle conversion of a chart to an image format or to basic HTML image maps.
Constructor:
Constructor | Description |
---|---|
ChartUtils( ) | This is the default constructor of the ChartUtilities Class |
Method Summary:
Method | Description |
---|---|
encodeAsPNG(BufferedImage image) | This method encodes a BufferedImage to PNG format. |
getImageMap(String name, ChartRenderingInfo info) | This method creates an HTML image map. |
saveChartAsJPEG(File file, float quality, JFreeChart chart, int width, int height) | This method saves a chart to a file in JPEG format. |
saveChartAsPNG(File file, JFreeChart chart, int width, int height) | This method saves a chart to the specified file in PNG format. |
writeChartAsJPEG(OutputStream out, float quality, JFreeChart chart, int width, int height) | This method writes a chart to an output stream in JPEG format. |
writeImageMap(PrintWriter writer, String name, ChartRenderingInfo info, boolean useOverLibForToolTips) | This method writes an image map to an output stream. |
writeScaledChartAsPNG(OutputStream out, JFreeChart chart, int width, int height, int widthScaleFactor, int heightScaleFactor) | This method writes a scaled version of a chart to an output stream in PNG format. |
Next TopicChartFrame class