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
Aligning Line Points On Bars
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
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
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

