Control Label Positioning?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
joelwyland
Posts: 15
Joined: Wed Jun 02, 2004 10:26 pm

Control Label Positioning?

Post by joelwyland » Tue Jun 08, 2004 9:34 pm

Hi all,

I've got a scatter plot with labels on the (x,y) points. I know it's not the greatest idea to have labels on a scatter plot, but for now, it's what I have to work with.

Several of the points are close together and the labels overlap. I'm trying to figure out a way to keep the labels from overlapping. Has anyone solved this problem?

Kenny

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

Post by david.gilbert » Wed Jun 09, 2004 5:26 pm

I didn't even try. You'd need to test for overlapping with all the other labels that have been drawn previously, and if overlapping occurs, find somewhere to move the label to. Not easy. If prefer to hide the labels and rely on tooltips to see the detailed values (not an option for everyone, I know).
David Gilbert
JFreeChart Project Leader

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

Locked