ChartUtilities « Development « JFreeChart Q&A





1. Why do I get a NullPointerException in ChartUtilities.writeChartAsPNG?    stackoverflow.com

I am trying to get a bar chart using JFreeChart.

final DefaultCategoryDataset dataSet = new DefaultCategoryDataset();
dataSet.setValue(1.0, "OS", "Ubuntu");
dataSet.setValue(2.0, "OS", "Linux");
dataSet.setValue(1.0, "OS", "Windows");
JFreeChart jFreeChartObj =  CreateBarChart.createBarChart(chartDetails);
response.setContentType("image/png");
ChartUtilities.writeChartAsPNG(response.getOutputStream(), jFreeChartObj, 500, 500);
I got an error ...

2. ChartUtilities writeImageMap() changes from v0.9 to v1.0rc1    jfree.org

I just upgraded from v0.9 to v1.0rc1 and noticed that the method parameters are different in v1.0 for the writeImageMap method in the ChartUtilities class. What I would like to know is what is the difference between these fragmen t generators parameters versus setting the ToolTip and URL generator via the setToolTipGenerator method on the BarRenderer3D class. BarRenderer3D renderer = new ...

3. Exception in ChartUtilities.saveChartAsPNG(archivo, ...)    jfree.org

Trying again to make the graphics appear in my web app, I did a test web app and I had trying to start the Tomcat with -Djava.awt.headless=true option as I read in some forums #export CATALINA_OPTS="-Djava.awt.headless=true" #/usr/java/jakarta-tomcat/bin/startup.sh but they do not appear either The web test app can be found here http://www.actesoft.com:8080/Prueba/jsp/ and the wanted result after click on "Graficar" is ...

4. Hi david - contention due to ChartUtilities.saveChartAsJPEG    jfree.org

Hi David Gilbert, Recently after the increase in the number of users, I am facing a re-occurring problem in my Web Application while creating chart images. After the analysis, I afraid the contention is due to the threads which calls ChartUtilities.saveChartAsJPEG method. My tomcat server hangs and finally I end up stopping and restarting the server. I am not able to ...

5. Error in ChartUtilities.saveChartAsPNG    jfree.org

I am using Domino 6.5.2 as webserver (JVM Ver 1.3.1). I am trying to generate simple barchart as listed in developer guide. JFreeChart newchart = ChartFactory.createBarChart( "Bar Chart Demo", // chart title "Category", // domain axis label "Value", // range axis label (CategoryDataset) dataset, // data PlotOrientation.HORIZONTAL, false, // include legend false, // tooltips? false // URLs? ); newchart.setBackgroundPaint(Color.white); CategoryPlot plot ...

6. ChartUtilities.saveChartAsJPEG    jfree.org

7. chartutilities savechartaspng arrayindexoutofboundsexception    jfree.org

chartutilities savechartaspng arrayindexoutofboundsexception by fanny82 Fri Feb 02, 2007 6:10 pm Hello, I'm using the ChartUtilities.saveChartAsPNG method. Sometimes I receive an arrayindexoutofboundsexception. The exception occurs on windows and linux. I am using jdk 1.5.0_06/1.5.0_10 and jfreechart1.0.0.jar /jfreechart1.0.3.jar. Sometimes the method is executed sucessfully and sometimes the following error occurs: [java] java.lang.ArrayIndexOutOfBoundsException: 16 [java] at java.util.ArrayList.add(ArrayList.java:352) [java] at org.jfree.chart.block.BlockContainer.add(BlockContainer.java: 161) [java] ...

8. ChartUtilities.saveChartAsJPEG    jfree.org

Hi, I have problem to write image in Servlet + Jsp. My Servlet ( creat BarChart3D ) [code] try { ChartRenderingInfo info = new ChartRenderingInfo( new StandardEntityCollection() ); String nome = ServletUtilities.saveChartAsJPEG( chart, 1000, 330, null ); File file1 = new File( nome ); ChartUtilities.saveChartAsJPEG( file1, chart, 1000, 330, info ); ChartUtilities.writeImageMap( writer, "chart", info, true ); String out = "





10. Problem with ChartUtilities.saveChartAsJPEG    jfree.org

Greetings, I'm getting troubles using the method ChartUtilities.saveChartAsJPEG, when I use it, I got the graphics file well definied but over all the graphics there is a transparent orange color. Here is my code: chart = ChartFactory.createPieChart3D((String)hashProperties.get("title"), getPieDataSet((Hashtable) , true, true, false); chart.setBorderVisible(false); PiePlot3D plot = (PiePlot3D) chart.getPlot(); plot.setStartAngle(290); plot.setDirection(Rotation.CLOCKWISE); plot.setForegroundAlpha(0.5f); plot.setBackgroundPaint(java.awt.Color.white); ChartUtilities.saveChartAsJPEG(new File(sFileName), chart, mWidth,mHeight); Thanks

11. problem with ChartUtilities.saveChartAsPNG(file1, chart, 400    jfree.org

hi i'm developping a web application with JSF to updates my charts, i'm calling the methode ChartUtilities.saveChartAsPNG(file1, chart, 400, 300, null); every 10seconds my application become more slow until it generates this error: Code: Select all javax.faces.el.EvaluationException: java.lang.OutOfMemoryError: Java heap space at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) at javax.faces.component.UICommand.broadcast(UICommand.java:387) at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55) ...

12. ChartUtilities formats    jfree.org

hi all, i am exporting some graphs using chartutilities but am not satisfied with dumming it down to a bitmapped image. i am looking for a vectorgraphic which i can then further play with in a drawing program - svg, eps or PICT files would all make me happy. is there a solution already out there? otherwise, i would link in ...

13. Problem with ChartUtilities.apply CurrentTheme    jfree.org

Problem with ChartUtilities.apply CurrentTheme by jfreechart-201007 Sat Jul 31, 2010 2:38 am I'm new to JFreeCharts. Working thru the examples I found what appears to the following bug: - Working thru Line Chart examples - Using Netbeans IDE - Run the code below - Observed Behavior: "SOURCE" attribute appears in font size 8, as indicated in line 101. This is ...

14. Memory Leak, ChartUtilities.saveChartAsPNG    jfree.org

I'm getting a memory leak with a class that has operated for about a year, but starting with Java 1.5 - and it seems since upgrading to 1.6, the problem became severe: all my Jfreechart applications are leaking. Re-compiling with Java 1.5 makes no difference, however. It could be that I have added 6 new Java application programs recently. Googling for ...

15. ChartUtilities.saveChartAsPNG produces Exception    jfree.org

ChartUtilities.saveChartAsPNG produces Exception by sgudenkauf Tue May 24, 2011 9:10 am Hi, whenever I use the org.jfree.chart.ChartUtilities to save a chart as a PNG file, the Legend of the generated image frequently shows entries multiple times. Also, I occasionally encounter the following exception. Code: Select all Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 3 at org.jfree.chart.block.FlowArrangement.arrangeNN(FlowArrangement.java:365) ...

16. ChartUtilities.writeChartAsPNG Question No Chart Display    jfree.org

ChartUtilities.writeChartAsPNG Question No Chart Display by psupa Wed Jun 23, 2004 2:44 am I create one servlet (ImageTest) to generate image and another jsp (demo.jsp) for displaying image. In demo.jsp, I call the image like this: But no chart display. What I call wrong in the jsp? I use Tomcat3.3.1, create project jfc0913 under webapps directory and put ...