ChartUtilities类

2024年8月29日 | 1 分钟阅读
  • ChartUtilities类属于JFreeChart库的org.jfree.chart包。
  • 此类也称为“ChartUtils类”。
  • 与ChartFactory类一样,此类也具有许多静态方法。
  • 此类中的大多数方法处理将图表转换为图像格式或基本HTML图像映射。

构造函数

构造函数描述
ChartUtils( )这是ChartUtilities类的默认构造函数

方法摘要

方法描述
encodeAsPNG(BufferedImage image)此方法将BufferedImage编码为PNG格式。
getImageMap(String name, ChartRenderingInfo info)此方法创建HTML图像映射。
saveChartAsJPEG(File file, float quality, JFreeChart chart, int width, int height)此方法以JPEG格式将图表保存到文件。
saveChartAsPNG(File file, JFreeChart chart, int width, int height)此方法以PNG格式将图表保存到指定文件。
writeChartAsJPEG(OutputStream out, float quality, JFreeChart chart, int width, int height)此方法以JPEG格式将图表写入输出流。
writeImageMap(PrintWriter writer, String name, ChartRenderingInfo info, boolean useOverLibForToolTips)此方法将图像映射写入输出流。
writeScaledChartAsPNG(OutputStream out, JFreeChart chart, int width, int height, int widthScaleFactor, int heightScaleFactor)此方法以PNG格式将图表的缩放版本写入输出流。

下一主题ChartFrame类