Combined chart problem

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Gloria

Combined chart problem

Post by Gloria » Sat Jan 04, 2003 10:24 am

Hi All!
I have created a combined chart of time series and vertical bar chart that treats as a price and volume chart. It can plot the chart but I found that the bar chart of each value is shift to the right with a margin. That means when cutting a line vertically through a value in the time series, the centre of the bar chart is shift to the right.....Is there any problem in my code?!
Thx!

Gloria

David Gilbert

Re: Combined chart problem

Post by David Gilbert » Tue Jan 07, 2003 12:16 pm

Hi Gloria,

In the TimeSeriesCollection class, there is a setPosition(...) method. This controls whether the x-value is taken from the start, middle or end of its time period. You should probably set this to middle so that it corresponds with the middle of the bars.

Regards,

Dave Gilbert

Gloria

Re: Combined chart problem

Post by Gloria » Sun Jan 12, 2003 9:01 am

Hi Gilbert,

I can change my desired x-value position after ur guide! Thx!

Gloria

Locked