XYbarChart problem

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
zobi13
Posts: 7
Joined: Mon Aug 01, 2005 9:24 pm

XYbarChart problem

Post by zobi13 » Fri Aug 05, 2005 8:46 pm

Hi,

I have made a XYbarChart with two series and i have a big problem. Indeed, the color of the second serie always hides the color of the first one when the second is higher. So i can only see the first one when it is higher than the second. How can i do to see both of them in every cases?

Thanks for reply.

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Post by skunk » Fri Aug 05, 2005 8:59 pm

Try changing your code so that

Code: Select all

public Number getStartXValue(int series, int item)

public Number getEndXValue(int series, int item)
returns different values for each series.

zobi13
Posts: 7
Joined: Mon Aug 01, 2005 9:24 pm

Post by zobi13 » Fri Aug 05, 2005 9:20 pm

I would like to add that my x-axis is a date-axis. So it is normal that some bars are at the same x-value(so the same date). Why can't i see all the bars from each serie? Why some of the bars are hidden by others?

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Post by skunk » Fri Aug 05, 2005 9:33 pm

OK. Then try using a ClusteredXYBarRenderer.

Guest

Post by Guest » Fri Aug 05, 2005 9:39 pm

Can you give me an example, or explain me how it works please?
Thank u very very much.

zobi13
Posts: 7
Joined: Mon Aug 01, 2005 9:24 pm

Post by zobi13 » Sat Aug 06, 2005 3:04 pm

I have noticed that the graph XYBarChartDemo2 uses ClusteredXYBarRenderer. Could i have the source code of this example please? Or another example. thanks.

Locked