ItemLabel Overlapping in BarChart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
cristo_haris
Posts: 7
Joined: Thu Jul 20, 2006 10:37 am

ItemLabel Overlapping in BarChart

Post by cristo_haris » Sat Sep 30, 2006 11:55 am

In BarChart inorder to view large number of records horizontal scroll bar was given.In that case
1 : font of ItemLabels and Legends are changed :roll:
2 : ItemLabels which are placed horizontal are overlapped :roll:

Hoping a good solution soon.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: ItemLabel Overlapping in BarChart

Post by david.gilbert » Mon Oct 02, 2006 10:59 am

cristo_haris wrote:1 : font of ItemLabels and Legends are changed :roll:
Are they changed, or just stretched? The ChartPanel class has an upper limit on the size of chart that it will draw (to ensure that the offscreen buffered image doesn't get overly large). Beyond that limit, the chart is drawn at the maximum size, then scaled up to fit the panel.

You can increase the maximum drawing size using the setMaximumDrawWidth() and setMaximumDrawHeight() methods - just be aware that more memory will be required if you are using the offscreen buffered image.
cristo_haris wrote:2 : ItemLabels which are placed horizontal are overlapped :roll:
There's no code to detect the overlapping, so the only option is to set a rotation for the labels so that they are drawn "vertically" and thus have less chance of overlapping.
David Gilbert
JFreeChart Project Leader

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

Locked