Hi,
I am trying to create a small stock chart tool using JFreeChart in which I am using the annotations capabilities that can be used to draw a Line, Text or other shapes on the chart. Also the great thing about these annotations are that they are rescaled appropriately when the chart is mouse zoomed in or out.
In the process I have had to create my own Custom annotation to draw an ARC annotation which is rendering fine on the chart. But the thing is that the arc is not getting scaled properly when the chart is zoomed in or out. What am I missing here? I have used the code XYLineAnnotation as the basis and followed the same struts like extending my XYArcAnnotations from XYAbstractAnnotation and implementing XYAnnotation interface overriding draw, equals, and other serialization methods. Can anyone suggest me what am I doing wrong?
thanks
SM
Custom Annotation Rescale..
Re: Custom Annotation Rescale..
Did you try using one of these instead of rolling your own?
Code: Select all
org.jfree.chart.annotations.XYShapeAnnotation
Re: Custom Annotation Rescale..
I have tried it but the shape is not being rendered properly.