Aligning Line Points On Bars

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
mjacobsca
Posts: 16
Joined: Thu Aug 21, 2003 4:59 pm

Aligning Line Points On Bars

Post by mjacobsca » Wed Jan 21, 2004 3:32 am

I have an overlaid chart with vertical bars and lines. However, my line chart is not aligned with my bar chart. They both plot the correct ranges, but the points are not aligned with the bars. I want them to appear in the middle of the bars if possible.

In order to keep bars thin, I have used item margins and bar sizes for appearance. However, since this is variable, and since most of those methods aren't available in the LineAndShapeRenderer, I can't seem to get the two aligned.

Any ideas?

Michael

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 » Thu Jan 22, 2004 12:15 am

The line renderer always puts the point in the middle of the category, whereas the bar renderer allocates each item to its own space within the category. You would need to modify the code for the line renderer to make these match up...it would be a handy feature.
David Gilbert
JFreeChart Project Leader

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

Locked