Display alternate label text

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
bjohnso5
Posts: 8
Joined: Mon Nov 10, 2008 9:38 pm

Display alternate label text

Post by bjohnso5 » Fri Nov 28, 2008 2:55 pm

Hi there,

I'm hoping someone will be able to provide some insight...
What I'm trying to do is probably a little unorthodox, since I assume JFreeChart is set up to accurately display data.

Background:
I am building a chart with a set range. One of the data columns has the potential to exceed the range. For readability, we have elected to place the labels above the bars, so if the column exceeds the maximum range, it's value label is not drawn.

I am attempting to "fake out" the chart, by adding a value close, but not quite at, the maximum if it exceeds the value. What I would like to be able to do is display it's label with the unadjusted value.

As an example, say the normal value is actually 750,000. I would modify the data that is placed in the dataset, changing it to 450,000.

Is there a component that I could potentially subclass to hold two values and print the label conditionally? I have been through the API, and it's not immediately obvious to me.

Any help anyone can provide would be greatly appreciated!

Thanks in advance!

- Bryan

bjohnso5
Posts: 8
Joined: Mon Nov 10, 2008 9:38 pm

Figured it out

Post by bjohnso5 » Fri Nov 28, 2008 7:47 pm

Never mind, I have a workable solution!

Locked