问题
I have used XYAnnotation
and drawn a rectangle in xylinechart
. Now how can I join it with another rectangle annonation?
回答1:
One way would be to use an XYLineAnnotation
plot.addAnnotation(new XYBoxAnnotation( 0.5,0.5,1.5,1.5)); plot.addAnnotation(new XYBoxAnnotation( 4.5,3.5,5.5,4.5)); plot.addAnnotation(new XYLineAnnotation( 1.5,1.5,4.5,3.5));

来源:https://stackoverflow.com/questions/13175274/join-a-rectangle-annotation-with-another-annotation-in-jfreechart