Title/legend and combined plots

Discussion about JFreeChart related to stockmarket charts.
Locked
daniel_henrique
Posts: 16
Joined: Mon Feb 20, 2006 3:52 pm

Title/legend and combined plots

Post by daniel_henrique » Mon Sep 18, 2006 11:19 am

Hi everybody.

Is it possible to add "subtitles/legends" for each plot in a combined xy plot (like in Image) ? How can i do that ?

Can i add these subtitles inside the drawing area ?

Thanks in advance !

RichardWest
Posts: 844
Joined: Fri Oct 13, 2006 9:29 pm
Location: Sunnyvale, CA

Post by RichardWest » Wed Oct 18, 2006 6:13 am

This would be beneficial for me too. I would appreciate any input, and I will investigate this myself. If I figure anything out, I will add it here, but I could appreciate anybody's input on this.
-- Richard
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA

tungnq.nguyen@yahoo.com
Posts: 1
Joined: Sat Mar 10, 2007 7:07 am

Post by tungnq.nguyen@yahoo.com » Sat Mar 10, 2007 7:34 am

Hi everybody

it seems the "subtitles/legends" for combined xy plot is supported in JFreeChart1.0.4 by using XYTitleAnnotation class

But i can not move them from BOTTON_RIGHT to TOP_LEFT. Do you know how to do them?

Thanks.
Bluefrog

develop
Posts: 296
Joined: Wed Mar 23, 2005 10:01 pm

Post by develop » Wed Mar 28, 2007 10:29 pm

try this. this will put title at top left corner

i am using same code as XYTitleAnnotationDemo.

change the line 92 to following (actuall just X and y cordinates and anchor)

XYTitleAnnotation ta = new XYTitleAnnotation(0.0, 1.0, lt,
RectangleAnchor.TOP_LEFT);

hope this helps

RichardWest
Posts: 844
Joined: Fri Oct 13, 2006 9:29 pm
Location: Sunnyvale, CA

Post by RichardWest » Wed Mar 28, 2007 11:48 pm

Works nicely--thanks. This was one of my first posts on the forum, so it is nice to have an answer and that people are willing to read this far back in time. Hopefully, there be a CategoryTitleAnnotation soon. Annotation support for CategoryPlots noticably lags behind XYPlots.
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA

develop
Posts: 296
Joined: Wed Mar 23, 2005 10:01 pm

Post by develop » Thu Mar 29, 2007 2:05 pm

i agree. we need categoryTitleAnnotation also.

Locked