My guess would be that this calls for a subclass of ClusteredXYBarRenderer that does some extra drawing (of the numeric value) on top of the bar. You'd override the drawItem method for that.
Ulf Dittmer wrote:My guess would be that this calls for a subclass of ClusteredXYBarRenderer that does some extra drawing (of the numeric value) on top of the bar. You'd override the drawItem method for that.
Maybe I am missing somthing and I am surely not questioning your advice and expertise. Is all this necessary just to do what I thought would be a simple, turn on or display x value labels.
Maybe I'm misunderstanding what you're trying to do. I interpreted "I need to display the x values on top of the bars in my chart. " to mean that you want the values to be drawn inside of the rectangle defined by each bar. Since FreeChart has no provisions for doing that, you'd have to go the route I outlined.
If you actually meant something else, please elaborate.
Out of the box, JFreeChart can only display values as part of an Axis, which can be left or right of a chart (for value axes) or above or below a chart (for domain axes); see the AxisLocation class for details.
Right now my chart displays horizontal bars, seven sets of five bars. It is showing a weeks worth of department activity. What the Management wants to see in addition to what I have is the values of the bars also displayed above each bar.