Is there a way to include some arbitrary text in the legend in a JFreeChart PieChart? I know it's possible to assign a PieSectionLabelGenerator in order to customize the labels of ... |
A legend is nothing else than a org.jfree.chart.title.Title. The dafault legend is created in a constructor of the JFreeChart class like this: Code: Select all // ... // create a legend, if requested... if (createLegend) { ... |
|
|
I have made my own LegendItemCollection with the LegendItems I wish to have, but when I try to add it with setFixedLegendItems() this functionallity does not seem to exist for the PiePlot or PiePlot3D classes. How can you change the legend items for a Pie Chart? I have tried using plot.getLegendItems() as well, but there doesn't seem to be a way ... |
|
|
|
Hello all, due to some project requirements i have 2 single pie charts based on CategoryPlots. Number 1 has pie sections : A, B, D, Number 2 has pie sections : C, D, E. Under normal circumstances these charts would produce two legends, containing A, B, D and C, D, E. I need to have them combined in one legend, with ... |
Hi all, I have a customization to be done in the legends being generated (below the chart) for the Pie charts. I want only the name of the category to be displayed and not the name = value pattern as it currently exists. If I try new StandardPieSectionLabelGenerator("{1}), it only changes for the labels being displayed next to the pie sections. ... |
|
|
Thanks a lot, it has done. Now I have a new question; I am trying to customize my pie charts labels. For example lable of charts part is 'SCM = 3%'. I want to show just the value '3%'. I have searced about this and find this: public String generateSectionLabel(final PieDataset dataset, final Comparable key) { String result = null; if ... |
Hi All, I am using Jfee Charts to generate various types of charts. The Legend text is coming properly for all kinds of chart but for pie chart I am getting the Legend text same as the default for chart area. ie. I have a pie chart which shows % of area covered, so in the chart arrows points to each ... |
|
|
I am displaying legend on right side of plot. The legend items are 10 or more, with more and more legend items the chart image (pie) is getting smaller and smaller. Is there any option so that I may have the chart size to 50% or something of the pie generated and rest to the legend items Please reply me as ... |
(Using jfreechart-1.0.9): My pie chart always has a legend no matter what options I pass in. I've also tried some other options as well and the legend won't go away. (Code below). Any ideas? //2nd arg false is supposed to mean NO LEGEND!? JFreeChart chart = ChartFactory.createPieChart("", dataset, false, false, false); PiePlot plot = (PiePlot) chart.getPlot(); // not the real data ... |
Hi, i have a pie chart with the legend at the right side and the pie at the left! I want the legend to have 1 item per line so i ajust the height of the chart in function of the item number for fit the legend, but doing this the pie is deformed when there are a lot of items. ... |
|
|
|
Hello, I have following, perhaps trivial question, but i couldn't find an answer The legend of piechart is positioned on the left. Due to long keys the chart itself becomes small. Is it possible to fix the legend size? Code: Select all public class ChartTest { public static void main(String[] args) { ... |
|
|