PieChart « PieChart « JFreeChart Q&A





1. Jfreechart help    stackoverflow.com

Is it possible to draw a 3D chart using JfreeChart like in the following link.If possible can anyone give some hints and some snippets of code on what parameters of Plot ...

2. Pie Chart 3D height    jfree.org

HI, I'm using jfreechart-0.9.21 and for my application I was trying to use PieChart3D. The problem is that in demo the Pie3D's height is good, but in mine it seems much more tall. I' saying this because in precedent release that I used (jfreechart-0.9.8) the height of 3D Pie was ok and i didn't get any problem. Here is my code.... ...

3. How to Gen Pie Chart using JDBC utilits having > 3 Colms?    jfree.org

HI, CAn you help me. I am trying to generate a Pie chart,. 1)Cannot User JDBCPieDataset as i have more than 2 Columns 2) I got the Databaset using JDBCCategoryDataset, However i do not have any menthos that create Pie charts that use JDBCCategoryDataset. 3)Other methods ( createPieChart , createMultiplePieChart ) use the PieDataset. Can any one help how to convert ...

4. Creating a Pie chart    jfree.org

Hi I am trying to create two Pie charts with ChartFactory.createMutiplePiecharts() method and passing the boolean variable as false for the Tooltip in the method .But the tool Tip is still appearing. Here is the line of code which I am writing for it: chart = ChartFactory.createMultiplePieChart("",dataset1,TableOrder.BY_COLUMN,true,false,false); Another issue is I want to customize the chart image for Pie chart such ...

5. TimeSeries as PieChart    jfree.org

6. difference in pie chart between Windows and Unix    jfree.org

Hi, I am using Jfreechart (latest version) and developing Pie chart with my data. It is working fine in Windows. But when I run the same code in Unix (Sun box), it displays the tooltip kind of thing. I haev 4 parameters that I pass for drawing the pie - title, dataset, legend, tooltips, URL. In windows, however I set my ...

7. Pie Chart    jfree.org

8. Help !! PieChart    jfree.org

9. 3D piechart problem, please help    jfree.org

UserPieChart is the class I wrote just to simply things a little more. Also, saveMychart is another function I wrote to work with servlet. Basically, the below code gives me the image above, but not sure where the gray bar come from? After I removed the outline, it gives the picture above, but when I place the outlinePaint back in, it ...





10. help,3D piechart problem!    jfree.org

11. Dimensions of Pie Chart    jfree.org

Hi: I have created a Pie Chart along with a legend displayed underneath it. Here is my problem. If the pie chart has many slices, then there are alot of items in the legend. The legend expands upward to make more room but that causes the area where the pie chart is displayed to become very small. As a result, the ...

14. PieCharts: Circular or with a given x by y ratio    jfree.org

I must draw pie charts. up to now I used PiePlot (2dimensional). Now it must be 3dimensional, so I use PiePlot3D. Before I simulated the pie's depth with a shadow (with x offset = 0). Now I do it the method setDepthFacor(), and that works fine. But: the old pies didn't need to be circular, so I set a x-by-y-ratio with ...

15. Need a sample code for making simple pie chart    jfree.org

I would like to use this product as demo seems to be very impressive. I would also like to purchase the developers guide. However, before I go ahead with the package and purchase the guide, I need to show at least a working code to my Manager. Could some one help me by providing a simple sample code and/or directing to ...

16. hiding pie chart sections    jfree.org





17. 3D Pie chart - Null Pointer Exception    jfree.org

I am getting NullPointer Exception when I pass a -ve Value or 0 to a 3D Pie chart. 2D Pie chart is working fine. java.lang.NullPointerException at sun.java2d.pipe.DuctusShapeRenderer.renderPath(Unknown Source) at sun.java2d.pipe.DuctusShapeRenderer.fill(Unknown Source) at sun.java2d.SunGraphics2D.fill(Unknown Source) at com.jrefinery.chart.Pie3DPlot.draw(Unknown Source) at com.jrefinery.chart.JFreeChart.draw(Unknown Source) at com.jrefinery.chart.JFreeChart.createBufferedImage(Unknown Source) at com.jrefinery.chart.ChartUtilities.writeChartAsJPEG(Unknown Source) at com.jrefinery.chart.ChartUtilities.writeChartAsJPEG(Unknown Source) at com.tsi.chart.ChartEngine.getChartImage(ChartEngine.java:299) at com.tsi.chart.ChartIt.genBinaryData(ChartIt.java:81) at com.tsi.servlets.ChartServer.doGet(ChartServer.java:162) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284) ...

19. Help! PieChart    jfree.org

When I created the piechart, I found a strange thing: When only 1 item, the piechart will draw label and labelLink once; when have 2 items, the chart will draw twice label and labelLink; when have n items, will draw it n times. It will cause the label and labelLink line are not same wide. It is bad when out svg. ...

20. 3d pie chart with split    jfree.org

21. creating pie-chart    jfree.org

22. Newline in PieChart    jfree.org

23. Is this possible in a PieChart??URGENT!!!!    jfree.org

Hi All, I want to create a Piechart with all the sections exploded.The problem is that,is it possible to further divide each exploded section? I want to plot a graph for disk partition.In which the first partition occurs for drives C,D,E etc...(each portion is to be exploded) and again these are to be partitioned in to USED and FREE. Is this ...

24. PieChart and no linebreak    jfree.org

25. Problem with Pie Chart    jfree.org

Hi Everyone, I have created the Pie chart same as in PieChartDemo1. I have created an Applet and added the ChartPanel in it and displayed it on the brower by accessing the applet. But the problem is that Pie chart is not showing the Legend. Can anyone tell me why? I have used the same approach to create Bar Charts and ...

26. elevation of 3D pie chart    jfree.org

27. can i draw a 2D pie chart?    jfree.org

Hi there i'm new to jfreechart. i wrote a simple pie chart use the following code JFreeChart chart2 = ChartFactory.createPieChart3D(null, dataset, false, false, false); later i want to change it to 2-dimension. i simply drop the "3D". but it does not work and the chart is still a 3D one! anybody will help me

28. Pie Chart is "busy"    jfree.org

One workaround would be to call setStartAngle() to change the rotation of the pie sections, in a way that doesn't wind up with all the small sections on the same side of the plot. But you should probably ask yourself how informative this chart is...do you really need to display all those mostly insignificant items? Why not aggregate them into one ...

29. Question on Piechart !    jfree.org

30. Pie chart    jfree.org

Hi, I have different problems on my PieCharts. 1/ how to use all the available space ? I have my chart centered in the area but spaces is still present on the top, bottom, left and right of the graph. I removed the title and others elements to keep only the graph. 2/ how to remove the outline of the graph. ...

32. need help with pie chart ,its urgent!!    jfree.org

Hi I want to display a pie chart having same key name i.e. DefaultPieDataset data = new DefaultPieDataset(); data.setValue("Category 1", new Double(43.2)); data.setValue("Category 1", new Double( 27.9)); data.setValue("Category 1", new Double(9.5)); data.setValue("Category 1", new Double(89.5)); data.setValue("Category 1", new Double(70.5)); When I run this code this gives a pie chart as a whole combining all the Category 1 values. So it it ...

33. Long time to load pie chart on Linux    jfree.org

Hi, I am using JFreeChart to create a pie chart panel (as shown in the examples). On windows everything is loaded OK, but on Linux it takes a long time (about 10 seconds) to load the chart. When I use SwingUtilities.invokeLater to invoke the chart creation, it improves the performance, but still takes a couple of seconds. Any idea why it ...

34. hideing percentages in piecharts    jfree.org

35. Link in a pie chart    jfree.org

Hi, How can i give link to a PieChart. Actually i used the below code to create link to pie charts CategoryItemLinkGenerator itemLink = new CategoryItemLinkGenerator() { public String generateLink(Object data,int series,Object category) { String url = "ex.htm"; return url; } }; But the link will not get created............... Hi friends send me the bugs or alternatives with ...

36. Pie chart    jfree.org

37. A multi-layer pie chart; does it exist?    jfree.org

Hello! I need a diagram to represent the following data (example): 1. All available space: hdd(70% of space)+dvd(30% of space). 2. How this space is distributed between different types of data: os:5%, programs: 15%, multimedia: 20%, other: 10%, free: 50%. This structure can be represented as a 2-layer 3D pie chart, but I did not find anything similar among the examples. ...

38. Pie chart but not complete circle? Can it be done?    jfree.org

What I mean is: I've got two sets of values, the second one being a detailed view of the values of the first. So, for example, I got a first series: Animals: 35 % Cars: 25 % Other stuff: 45 % And then, for Animals I've got: Cats: 20% Dogs: 10% Killer whales: 5% So those percentages are not relative to ...

40. Disable PieChart contour ?    jfree.org

Hello, I hope this question hasn't been asked here before, maybe I am not able to find the right words to search for it (I am French and the vocabulary is too precise for me ) Anyway, I created a PieChart using ths code : Code: Select all JFreeChart chart = ChartFactory.createPieChart( ...

41. HTML links in a pie Chart : URLGenerator    jfree.org

HTML links in a pie Chart : URLGenerator by Pierre Thu Jan 18, 2007 5:18 pm I try to manage HTML links in a sections of a Pie Chart. I used basic examples and URLGenerator classes described in the user guide, but obviously, there is something missing in my code because it doesnt work. Could you tell me what is ...

42. perimiter-only outline for piecharts?    jfree.org

hi, i'd like to generate a piechart with a circular coloured outline around it, without having the lines between sections be that same colour/stroke. i've tried everything i could think of with the various setoutlinepaint/setbasesectionpaint/etc methods, but everything seems to affect the entire outline around a section rather than just the outer border. am i missing something obvious here or will ...

43. Modify categorylabel on piechart    jfree.org

44. Pie chart help    jfree.org

I looked at the code, but it looks like it would be a big patch... Right now the ring inherits from pie chart, and only overrides the drawing to do a ring rather than the whole pie... This change would require an instance to not inherit from the pie chart and allow for multiple PieDatasets. It would have to take on ...

45. Help need regarding Pie chart    jfree.org

hi David, Is there a way to fix the size of the pie chart irrespective of the number of legend items in the chart? Right now, I'm saving the chart as JPEG and I notice that the size of the chart varies according to number of legend items. Secondly is there a way to wrap the legend text? I have given ...

46. Pie Chart with Database    jfree.org

Hello there, I am trying to create a pie chart which gets the data from the db. the problem is the pie chart is not created for all the values. there are 8 values that should be displayed but only 4 are displayed. but when i use a simple select like select value,name from city.it displays all the values. but not ...

47. Pie chart problem    jfree.org

Pie chart problem by agarg Sun Mar 18, 2007 6:08 pm Hi, I am trying to create a simple pie chart and show values as a call out on the pie sector. The code as follows Code: Select all JFreeChart chart5 ; DefaultPieDataset lDataset = new DefaultPieDataset(); // ...

48. PieChart    jfree.org

50. cewolf 1.0 pie chart problem    jfree.org

In a JSP I show a Piechart with 11 categories (0 to 10) now and again the Legend of this piechart 'shifts' the colours that are being used. When the problem occurs the colors are shifted consistently with the number of categories that do not have any values. However, in the dataset I do set zero-s for all 'empty' categories. When ...

51. doubt regarding piechart    jfree.org

52. getSeriesKey() in LegendItemEntity for pie chart always null    jfree.org

getSeriesKey() in LegendItemEntity for pie chart always null by predrag Fri Jun 22, 2007 4:40 pm It looks like getSeriesKey() method in LegendItemEntity in v1.0.6 always returns null for pie charts. Just like deprecated getSeriesIndex() always returned 0. In other words, it is not possible to decipher what item you clicked on in the pie chart legend. Here is modified ...

53. PieChart    jfree.org

54. Pie Chart and InteriorGap    jfree.org

Code: Select all private JFreeChart buildPieChart(Portfolio portfolio) { PortfolioPieDataset ppd = new PortfolioPieDataset(portfolio); //JFreeChart chart = ChartFactory.createPieChart("", ppd, false, false, false); ...

55. where to set the Pie chart title    jfree.org

hi, anybody can help? i wish to set the pie chart title. as i searched from the forum, got the example listed that setMaximumLabelWidth() and so on but this is set for the label, am i right ? JFreeChart chart = ChartFactory.createPieChart(piechartParameter, dataset, true, true, false); chart.setBackgroundPaint(Color.white); /// notes: set the chart title's font size thanks a lot...

56. how to create a half pie chart    jfree.org

57. few queries about piechart    jfree.org

hi guys....... 1. is there any other way to view a chart other than ChartFrame()? 2. suppose I click a button on a .jsp page to call the .java file(where a piechart code is written to view a chart using chartframe)...can that b done? 3. I dont want the options/items with a value=0 to be shown on the piechart. is it ...

58. one simple pie chart programme is giving error    jfree.org

hello everyone i've one programme which is giving following error and i am not able to track the error. i've only one jar file in classpath Exception in thread "main" java.lang.NoSuchMethodError: org.jfree.text.TextBlock .setLineAlignment(Lorg/jfree/ui/HorizontalAlignment;)V at org.jfree.chart.title.TextTitle.arrangeRR(TextTitle.java:491) at org.jfree.chart.title.TextTitle.arrange(TextTitle.java:450) at org.jfree.chart.JFreeChart.drawTitle(JFreeChart.java:1125) at org.jfree.chart.JFreeChart.draw(JFreeChart.java:1015) at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1213) at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1193) at org.jfree.chart.ChartUtilities.writeChartAsPNG(ChartUtilities.java:17 4) at org.jfree.chart.ChartUtilities.saveChartAsPNG(ChartUtilities.java:329 ) at org.jfree.chart.ChartUtilities.saveChartAsPNG(ChartUtilities.java:300 ) at PieChartWithCustomColours.main(PieChartWithCustomColours.java:39)

59. pie chart question/problem    jfree.org

pie chart question/problem by zemin.hu Wed Oct 10, 2007 10:12 pm I am new to jfreechart (only few hours experience), I am mainly attracted to use pie chart feature. My task also requires me to convert the pie chart into SVG file or stream. It looks wonderful when I started with one simple pie chart example. When I explored more, ...

60. issue with pie chart    jfree.org

61. Throws exception while generating Piechart    jfree.org

Hi, I am getting this exception while generating Piechart. java.lang.NoSuchMethodError: org.jfree.text.TextUtilities.drawAlignedString(Ljava/lang/String;Ljava/awt/Graphics2D;FFLorg/jfree/ui/TextAnchor;)Ljava/awt/geom/Rectangle2D; at org.jfree.chart.StandardLegend.drawSeriesElements(StandardLegend.java:1035) at org.jfree.chart.StandardLegend.draw(StandardLegend.java:870) at org.jfree.chart.StandardLegend.draw(StandardLegend.java:690) at org.jfree.chart.JFreeChart.draw(JFreeChart.java:896) at org.jfree.chart.JFreeChart.draw(JFreeChart.java:804) ....................... I am using JFreeChart1.0.6 jar and jCommon 0.9.6 jar. The exception throws while the execution reaches, ChartUtilities.saveChartAsJPEG(new File("c:/JasperReport/dynamic3DPieChart.jpg"), chart1, 500, 300); when i generated the chart as an independent java application by hardcoding it generates successfully,while using the same ...

62. help with 3D pie chart    jfree.org

63. piechart problem    jfree.org

64. Problem with subtitles in PieChart    jfree.org

Hello, I have a big problem with subtitles in PieChart3D. Their captions patterns are colored ring with a description and number that in graphics. I want the subtitle is formed by colored squares with the description that are in the graphics and stay upright inside a rectangle the right of the graphics. Someone help me?

65. How to move to the next page when clicking in the pie chart    jfree.org

How to create renderer object i have developed a chart using scriptlet class that is normal java class and i am calling through the JRXML and rendering the chart object here and i m printing that chart thorugh servlet using Jrxmlloader and printmanager classes.so is it possible to write the events for the pie chart in the scriptlet if possible then ...

66. 3D pie chart problem - Memory Leak?    jfree.org

I generate 3D pie charts in my application and after a while (day or two) the chart's borders start making spirals on the left side of the chart instead of bordering the pie. If I restart the application then it works correctly. I'm not caching anything related to JFreeChart. I'm unable to add an image or URL to show an example ...

67. Creating PieChart with Sybase Database    jfree.org

Hi all, I m working on JFreeChart from couple of weeks. I try to create the piechart with data coming from sybase database this is the data: Day: 2006-07-27 success: 117 partial:5 failed: 2 Day: 2006-07-28 success: 172 partial:0 failed: 5 Day: 2006-07-29 success: 96 partial:0 failed: 16 Day: 2006-07-30 success: 72 partial:0 failed: 16 Day: 2006-07-31 success: 0 partial:0 failed: ...

68. Issue in pie chart    jfree.org

69. Help needed in lgends in pie chart    jfree.org

Hi I am using jfree to create pie chart... For eg If I have 10 sections in the pie chart with the values as "Java=programming (34 %) " and like this I have 10 values.... when the pie chart is drawn ...I have this value in the label and also in the legend .....and so the legend looks so congested and ...

70. 2nd try: Pie chart customizations    jfree.org

If you see the image below, you will see that the sections in the pie chart have a dark gray border. I am not setting any such thing. In fact I am setting: plot.setSectionOutlinesVisible(false); 1) However, the gray border does not go away. Is there something i am missing? 2) I also want to get rid of the black border surrounding ...

71. How to tilt a 3d Pie chart    jfree.org

72. Unable to get the pie chart    jfree.org

Hi all, I wrote a program to get chart on web page using Liferay . When I use localhost:8080. I am getting the chart(able to view the chart).But when I use ip address I am not able to view the chart. Please help me why this thing is happening and how to come out of this.I am getting the chart object ...

73. PieChart 3D    jfree.org

74. Pie Chart problem    jfree.org

Hi, while rendering pie chart i am passing data dynamically. In one case when one data element is having 100% and rest is zero .In pie chart it is showing full pie chart with one color but there is one thin line into that which is not correct. How can I avoid this thin line in this scenario. I am using ...

75. Dropping 0% slices from a pie chart    jfree.org

I'm rendering a pie chart, some of the slices show 0% because the units of the slice are so small when compared to the total value. Is there a way of eliminating these slices from the pie chart. Originally I tried to skip any slice with units = zero when building the datasource but these slices still come through because the ...

76. PieChart    jfree.org

PieChart by 20033716 Sat Jul 11, 2009 9:53 am Hi there, I am trying to generate an animated exploded 3d piechart.But for some strange reason 3D piechart is not exploding while its happening for 2D. http://picasaweb.google.com/harishravi86/Piechart?authkey=Gv1sRgCNKnpMHst-XZ-AE&feat=directlink The code is not organized nevertheless its a test code... Code: Select all import java.awt.Color; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.TimerTask; import ...

77. Spikes in PieChart    jfree.org

Spikes in PieChart by ninitha Wed Aug 26, 2009 7:10 am Hi, I am using JDK 1.5 and JFreechart 1.0.9 version. When I generate a pie chart in SVG format with section outline color of white, There are spikes in the center. Do I have any option in jfreechart to remove those spikes. Those spikes can be seen clearly in ...

78. How I can draw PieChart 3d from a different angel of view?    jfree.org

Hi Thank you for reading my question. Is it possible to show a 3d pie chart from a different angel of view? I am looking to change the horizontal angle of chart. right now it has a 45 degree angle with the horizontal line. I want to change it to 10 degree or something like that. Thanks

79. How to use RadialGradientPaint class in PieCharts    jfree.org

How to use RadialGradientPaint class in PieCharts by vashisht Wed Oct 21, 2009 9:34 pm Hi, If you are using JVM 1.6 and would like to use the RadialGradientPaint class to specify colors and fractions for your pie sections. try out the steps below You would need to 1) modify the org.jfree.chart.plot.PiePlot.java class simply add the following two methods Code: ...

80. Pie chart: how to specify the radius of the pie?    jfree.org

I happened upon this post whilst generating a PDF myself over the past couple of weeks--probably you've already solved it somehow, but posting this for posterity anyways. I never did find a great way to explicitly specify the radius of the pie itself (which seems odd), however there is a "trick" to force the radius to be smaller at least: set ...

81. Subdivide pie chart    jfree.org

Hello, I have been using JFreeChart for a short while now and I am very pleased with the ease of use, documentation, flexiblity, and results. Keep up the good work! Question: Is there a way I can subdivide a pie chart to contain slices within a pie slice? For example - let's say I have a pie with different food groups, ...

82. Help in creating dynamic pie chart    jfree.org

Conclusion: JFreeChart is a library to create chart images. An image is usually static (I ignore exceptions like animated GIFs here). So JFreeChart is not able to produce dynamic chart images. BUT: JFreeChart is able to create multiple chart images, which could be used in a web application that updates (chart-)images on request. You would need some JavaScript for this to ...

83. Pie Chart Interaction    jfree.org

Pie Chart Interaction by bkhova211 Wed Dec 08, 2010 3:18 am Hey Im making a program that creates pie charts with jfreechart, but I'm stuck on how to allow others to input their own data to make a pie chart themselves. With the code I have now it outputs a sample pie chart, but im lost the rest of the ...

84. 3D Pie chart    jfree.org

85. Pie chart - set radius method.    jfree.org

I have read a number of forum threads requesting the reintroduction of the PiePlot.setRadius() method, seemingly to no avail. There are times when you want to draw comparative Pie Charts (e.g. assets v liabilities in financial applications), the overall size of each Pie accurately reflecting the sum of its sections. There are also times when you deliberately want the pie to ...

86. PieChart - ClassCastException    jfree.org

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer at java.lang.Integer.compareTo(Integer.java:37) at java.util.TreeMap.getEntry(TreeMap.java:328) at java.util.TreeMap.get(TreeMap.java:255) at org.jfree.chart.plot.PiePlot.getMaximumExplodePercent(PiePlot.java:1633) at org.jfree.chart.plot.PiePlot.drawPie(PiePlot.java:2484) at org.jfree.chart.plot.PiePlot.draw(PiePlot.java:2391) at org.jfree.chart.JFreeChart.draw(JFreeChart.java:1235) at org.jfree.chart.ChartPanel.paintComponent(ChartPanel.java:1663) at javax.swing.JComponent.paint(JComponent.java:1029)

87. Filter Options in PieChart    jfree.org

I just learned now how to use the PieChart option. Is it possible to add filter options to it. The example I have is: - 100 Projects in total with red, green, yellow status - Combined Filter option, that I only see a selection of this 100 projects by a selected region and a selected department. Your patient support is much ...

88. how to develop pie chart using SWT    jfree.org

Hi all, i need to draw a pie chart using SWT Component. which is plugin to Eclipse-Helios. I can draw the piechart using JfreeChart. But the Jfree chart is developed for Swings. This is running in Eclipse but does not work as plugin to the Eclipse . why because the views in Eclipse are developed purelly using SWT. So when i ...