public class ChartExporter extends Object
Constructor and Description |
---|
ChartExporter() |
Modifier and Type | Method and Description |
---|---|
static void |
exportChartAsPDF(File pdfFile,
JFreeChart chart,
int width,
int height)
Export a JFreeChart to PDF.
|
static void |
exportChartAsSVG(File svgFile,
JFreeChart chart,
int width,
int height)
Export a JFreeChart to SVG.
|
public static void exportChartAsSVG(File svgFile, JFreeChart chart, int width, int height) throws UnsupportedEncodingException, IOException
svgFile
- the target svg file.chart
- the chart to export.width
- the width of the panel the chart is painted in.height
- the height of the panel the chart is painted in.UnsupportedEncodingException
IOException
public static void exportChartAsPDF(File pdfFile, JFreeChart chart, int width, int height) throws FileNotFoundException, com.itextpdf.text.DocumentException
pdfFile
- the target pdf file.chart
- the chart to export.width
- the width of the panel the chart is painted in.height
- the height of the panel the chart is painted in.FileNotFoundException
- if the file to write cannot be found.com.itextpdf.text.DocumentException
- on error.Copyright © 2015–2021 Fiji. All rights reserved.