List of usage examples for org.jfree.graphics2d.canvas CanvasUtils writeToHTML
public static void writeToHTML(File f, String title, String canvasID, int width, int height, String canvasScript) throws IOException
From source file:org.jfree.graphics2d.demo.CanvasPieChartDemo1.java
/** * Starting point for the demo./*from w w w.ja v a 2 s .co m*/ * * @param args ignored. * * @throws IOException */ public static void main(String[] args) throws IOException { JFreeChart chart = createChart(createDataset()); CanvasGraphics2D g2 = new CanvasGraphics2D("id"); int width = 600; int height = 400; chart.draw(g2, new Rectangle(0, 0, width, height)); File f = new File("CanvasPieChartDemo1.html"); CanvasUtils.writeToHTML(f, "CanvasPieChartDemo1", g2.getCanvasID(), width, height, g2.getScript()); }
From source file:org.jfree.graphics2d.demo.CanvasBarChartDemo1.java
/** * Starting point for the demo./* w w w.j ava 2 s. c om*/ * * @param args ignored. * * @throws IOException */ public static void main(String[] args) throws IOException { JFreeChart chart = createChart(createDataset()); CanvasGraphics2D g2 = new CanvasGraphics2D("id"); int width = 600; int height = 400; Rectangle r = new Rectangle(0, 0, width, height); chart.draw(g2, r); File f = new File("CanvasBarChartDemo1.html"); CanvasUtils.writeToHTML(f, "CanvasBarChartDemo1", g2.getCanvasID(), width, height, g2.getScript()); }
From source file:org.jfree.graphics2d.demo.CanvasTimeSeriesChartDemo1.java
/** * Starting point for the demo.//w w w . j av a 2 s. co m * * @param args ignored. * * @throws IOException */ public static void main(String[] args) throws IOException { JFreeChart chart = createChart(createDataset()); CanvasGraphics2D g2 = new CanvasGraphics2D("id"); int width = 600; int height = 400; chart.draw(g2, new Rectangle(0, 0, width, height)); File f = new File("CanvasTimeSeriesChartDemo1.html"); CanvasUtils.writeToHTML(f, "CanvasTimeSeriesChartDemo1", g2.getCanvasID(), width, height, g2.getScript()); }