increase PNG size

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
madhuri_ls
Posts: 10
Joined: Thu Jun 24, 2004 7:15 am

increase PNG size

Post by madhuri_ls » Tue Jun 29, 2004 8:02 am

hi

I want to increase PNG fle size.

code:-


final CategoryDataset dataset1 = createDataset1(path);
final NumberAxis rangeAxis1 = new NumberAxis("Questions");
rangeAxis1.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
rangeAxis1.setTickUnit(new NumberTickUnit(2.0));
final LineAndShapeRenderer renderer1 = new LineAndShapeRenderer();
renderer1.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());

renderer1.setDrawShapes(true);

final CategoryAxis domainAxis = new CategoryAxis("Student Test - 1");
final CategoryPlot subplot1 = new CategoryPlot(dataset1, domainAxis, rangeAxis1, renderer1);
subplot1.setDomainGridlinesVisible(true);

JFreeChart chart = new JFreeChart("", JFreeChart.DEFAULT_TITLE_FONT, subplot1, true);
chart.setBackgroundPaint(java.awt.Color.white);

// Write the chart image to the temporary directory
ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());
filename = ServletUtilities.saveChartAsPNG(chart, 500, 500, info, session);

// Write the image map to the PrintWriter
ChartUtilities.writeImageMap(pw, filename, info);
pw.flush();



Thanx

angel
Posts: 899
Joined: Thu Jan 15, 2004 12:07 am
Location: Germany - Palatinate

Post by angel » Tue Jun 29, 2004 8:59 am

To increase the dimensions:
ServletUtilities.saveChartAsPNG(chart, 1000, 1000, info, session);

Locked