I have created a chart where I want one OHLC set each year.. but my graphs always renders in the middle of 2 years like it is in june.. This is what i have
Year temp = new Year(2001);
OHLCSeries s2 = new MyOHLCSeries("test");
s2.add(new Year(new Date(temp.getFirstMillisecond())), 10, 10, 2, 2);
This renders right between 2001 and 2002.. why is that?
its like it finds the year and uses getMiddleMillisecond() in some way when it renders.
I found that OHLCSeriesCollection has
TimePeriodAnchor xPosition = TimePeriodAnchor.MIDDLE; set and no way of changing the value. So ill have to make my own.
OHLC dates always renders in the middle of the year
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Thanks for reporting this. I've added getXPosition() and setXPosition() methods to the OHLCSeriesCollection class, for inclusion in the 1.0.11 release (later this month, all going well).
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

