legend « LineChart « JFreeChart Q&A





1. Line Charts and legend values ON the lines themselves    jfree.org

I know how to not include a legend in the ChartFactory.createLineChart(...) API. However what I would like is that the individual values of the legend be displayed next to the line that is graphed. My need is different than the legend.setPosition(RectangleEdge.RIGHT) concept. What I want is the legend value for a particular line to be embedded into the graph itself. For ...

2. change legend in a line chart    jfree.org

I asked about this before (change the shape of diferent lines in the legend in order to recognize diferent colours), you recommend me to use either the setLegendLine() or the getlegendItem() both of the XYLineAndShapeRenderer class. The thing is we don't use this class, we use LineAndShapeRenderer, which hasn't this methods, what can we do?. thanks in advance

4. How to change the legend in a lineChart    jfree.org

Bear in mind that: (1) The series key can be any instance of Comparable; (2) The legend label is derived from the toString() method for the key. If you use a String as the series key (the most common scenario, because it is easy) then that String appears in the legend. But you could create your own SeriesKey class that implements ...

5. Changing shape in Legend of Line chart    jfree.org

Hi all, I was just wondering is there anyway we can change the shapes inside the legend of a Line chart? The lines are really thin so it's difficult to distinguish what is what. I've seeen a couple of potential solutions involving changing the line stroke through the XYLineAndShapeRenderer, or setLegendLine. I was just wondering if there were any other new ...

6. Set Legend Stroke of Line Chart    jfree.org

Hi ! I don't know if my solution will help you, but I did something which could interest you : I created a kind of "StrokeGifCeator" : it returns a GIF with the stroke you want. Code: Select all public class StrokeGifCreator { private BufferedImage image; public Image createGif(final Stroke stroke) { ...