add « Legend « JFreeChart Q&A





1. Jfreechart - how to add a legend item with a dash?    stackoverflow.com

I want to add a legend item with a dash (-) to denote some series in my chart. The default shape provided are only Plot.DEFAULT_LEGEND_ITEM_CIRCLE and Plot.DEFAULT_LEGEND_ITEM_BOX. Is there something ...

2. How to add source(Not legend) to the chart (like footer)    jfree.org

Is there a way to add source to the chart, just like footer in the MS word. I am not talking about legend, my requirement is to add source at the bottom of the chart. eg.., source: xyz company, country name. Source should be part of the chart. So when I save the image, this source should be added as, how ...

3. Adding a custom legend    jfree.org

Hi There, I've created an application that has a JTable in which a user can filter data in/out. Once they have filtered the data (which they really don't have to do with a small dataset), they can generate different types of charts with an XYDataset. Everything looks fine, but the client would like to have a legend added to the chart ...

4. Add legend to Chart    jfree.org

Not sure what you mean. Maybe you want the legend to be positioned inside the plot area, rather than outside the axes. I'm experimenting with a new annotation type that can put any chart title (including the legend) inside the plot area...but it isn't part of the API yet. I will include it in the 'experimental' directory in the 1.0.4 release. ...

5. Want to add title for legends    jfree.org

Hi It would be great help if someone can help me. I have created legends on right hand side, everthing is fine except the title for them. I am not able to give any title to them. ___________________________________________________________ XYPlot xyplot = (XYPlot)chart.getXYPlot(); LegendItemCollection lgItmCol = new LegendItemCollection(); for(int j=0; j

6. How to add a source to a legend?    jfree.org

You can only specify one LegendItemSource, which will be either one of the subplots, or the parent plot. If you want to include all of the series from one subplot PLUS a subset of the series from another subplot, then you'll have to either use the setSeriesVisibleInLegend() method to hide the series you don't want in the legend, or write a ...

7. How to add title in a Legend    jfree.org

LabelBlock labelblock = new LabelBlock("LEGEND", chartfont); labelblock.setPadding(5D, 5D, 5D, 5D); BlockContainer blockcontainer = new BlockContainer(); blockcontainer.add(labelblock, RectangleEdge.TOP); BlockContainer blockcontainerReal = new BlockContainer(); LabelBlock labelblockReal = new LabelBlock("Real", chartfont); blockcontainerReal.add( labelblockReal, RectangleEdge.TOP); BlockContainer blockcontainerLegend = legend.getItemContainer(); blockcontainerReal.add(blockcontainerLegend); blockcontainer.add(blockcontainerReal); ...

8. adding a legend to a Dial    jfree.org

Hi Andy, Nice dial! To get a (manually specified) legend you could do the following: (1) Add the following constructor to LegendItem (it will be included in 1.0.12): Code: Select all /** * Creates a legend item with the specified label and fill paint. The * ...

9. Extending Legend to add checkboxes?    jfree.org

@Override public void chartMouseClicked(ChartMouseEvent chartmouseevent) { ChartEntity chartentity = chartmouseevent.getEntity(); if(chartentity != null && (chartentity instanceof LegendItemEntity)) { //this doesnt work ...





10. Adding new legend    jfree.org

11. How to add additional information into legend?    jfree.org

I use following chart code: Code: Select all double[][] data=new double[][] {{500}, {200}, {100}, {400}, {300}}; String[] rowKeys={"apple", "pear", "graph", "orange", "banana"}; String[] columnKeys={""}; dataset=DatasetUtilities.createCategoryDataset(rowKeys,columnKeys,data); chart=ChartFactory.createBarChart3D("Fruit sale graphic", "fruit", ...