offset numbers at bottom of BarChart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
hugo
Posts: 7
Joined: Wed Jun 23, 2004 12:09 pm

offset numbers at bottom of BarChart

Post by hugo » Sat Jul 17, 2004 9:54 pm

I have implemented my own scrolling barchart quite successfully. I have an external Data class that 'serves' subsections of its data to another class that displays this data. When an adjustment is detected on the scrollbar a new subsection is requested and displayed. This works quite well but I don't know how to set the numbers below the bars (Category Labels) to reflect the number of the bar with respect to the entire data set rather than the number of the bar in the current view/subsection. Can anybody help me please.

Obviously I know the range of the current view but just don't know how to set an 'offset' in the category labels.

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 » Mon Jul 19, 2004 11:19 am

The category labels come from the column keys in the dataset, so you should look at what your custom dataset is returning from the getColumnKey(int) method.
David Gilbert
JFreeChart Project Leader

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

Locked