0

I have a jfreechart XYPlot with XYPointerAnnotation's, ValuesMarker's and other objects that has labels to show some info.

The problem I have is that depending of the point an annotation is setted, its label often are cutted from the plot margin.

The question is if there are some method to detect if a label is out of rendering area of a plot.

And related to this, is it possible to detect collision between2 annotations labels? Something that comparing the box label area retrieved from the XYAnnotationEntity. This is for avoiding the overlapping between annotations's labels.

Thanks in advance.

pacobm
  • 45
  • 6
  • If you question is _not_ a duplicate, please edit your question to include a [mcve] that shows your revised approach. – trashgod Jul 28 '16 at 04:28
  • @trashgod The question you mention, correct if I'm wrong, is about make the plot area higher/wider to make visible the data and labels in it due to a limit in the axis. My question is about to detect when a label is out of this plot area. – pacobm Jul 28 '16 at 10:15
  • I don't know of another supported way, although you may want to enable zooming, too. – trashgod Jul 28 '16 at 15:51
  • @trashgod ok, thanks for your response. In the same way, I suppose that is not possible to detect collisions between labels, isn't it? – pacobm Jul 28 '16 at 16:13
  • Not via [tag:jfreechart]; I'd look at [tag:prefuse], for [example](http://stackoverflow.com/a/30395586/230513). – trashgod Jul 28 '16 at 16:36
  • Thanks very much for your responses. – pacobm Jul 28 '16 at 16:57

0 Answers0