JFreeChart / crosshairs

M

Magnus

Hello!

I've created a JFreeChart chart which has a sinus wave (for testing)
values varying from 3800 to 4200. In this chart I want to set a
crosshair, so I do the following:

XYPlot xyp = chart.getXYPlot();
xyp.setRangeCrosshairVisible(true);
xyp.setRangeCrosshairValue(4000, true);
xyp.setRangeCrosshairLockedOnData(true);

....which I expected to give me a crosshair at value 4000 - instead I
get a crosshair at 3800. I tried disabling
setRangeCrosshairLockedOnData() (not being so sure what it is it
actually does), this caused the crosshair to disappear completely.

Also tried a lot of other values, but with
setRangeCrosshairLockedOnData(true) everything seems to wind up with a
crosshair at 3800. With setRangeCrosshairLockedOnData(false) I get
nothing.

Perhaps the matter is affected by the way I've set the minimum-value
of the range axis?

ValueAxis axis = xyp.getRangeAxis();
axis.setMinimumAxisValue(3500);
axis.setTickMarkInsideLength(0.0f);

I'm using JFreeChart-0.9.8 bundeled with cewolf.

Is there any valuable online help for JFreeChart in addition to the
javadoc?

Thanks in advance for any help!
Magnus
 
B

Babu Kalakrishnan

Magnus said:
I've created a JFreeChart chart which has a sinus wave (for testing)
values varying from 3800 to 4200. In this chart I want to set a
crosshair, so I do the following:
[snip]

I'm using JFreeChart-0.9.8 bundeled with cewolf.

Is there any valuable online help for JFreeChart in addition to the
javadoc?

I think JFreeChart is now at version 0.9.21, and quite a few changes
changes have happened in the API itself between 0.9.8 and 0.9.21. So I'm
not sure if the current documentation would even apply to your problem.

As for additional documentation, you can buy the full manual from their
website.

In any case, I think you are more likely to get better answers if you
post these questions to the JFreeChart forum accessible from
http://www.jfree.org.

BK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top