how to use CategoryTextAnnotation

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Yu

how to use CategoryTextAnnotation

Post by Yu » Tue May 20, 2003 3:22 pm

Hi,

I just upgraded my jfreechart from 0.96 to 0.98 and tried to use the new feature of "CategoryTextAnnotation". But it seemed not working working. Does anybody have any example of this? What does the parameter "java.lang.Comparable category" and "double value" mean? How do i use it?

Thanks in advance!
Yu

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Fri May 23, 2003 12:06 pm

These specify where the text will be placed on the chart. The category refers to the position on the domain axis, and the value refers to the position on the range axis.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

bob yang

example

Post by bob yang » Tue May 27, 2003 10:09 pm

plot.addRangeMarker(marker); // drawing average
CategoryTextAnnotation categoryTextAnnotation1 = new CategoryTextAnnotation("Average ",new Font("SansSerif", Font.PLAIN, 20), Color.red, "",marker.getValue());
plot.addAnnotation(categoryTextAnnotation1);

Locked