ImageMapUtilities improvement

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
pelski
Posts: 16
Joined: Thu Feb 23, 2006 2:02 am

ImageMapUtilities improvement

Post by pelski » Fri Jun 02, 2006 6:51 am

I have noticed that the ImageMapUtilities will produce
multiple map elements for identical coords.

In the method:

Code: Select all

public String getImageMapAreaTag(
            ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,
            URLTagFragmentGenerator urlTagFragmentGenerator) {
you could put the coords into a Map, or a Set, so that only the last element
with the same coords gets sent back to the client.

This is particulary a problem with large datasets rendered on small charts.

Please let me know if you would like me to help implement this.

Cheers,
Nick

angel
Posts: 899
Joined: Thu Jan 15, 2004 12:07 am
Location: Germany - Palatinate

Post by angel » Fri Jun 02, 2006 8:44 am

This is not that simple. The areas can overlap and it will take great effort.

pelski
Posts: 16
Joined: Thu Feb 23, 2006 2:02 am

Post by pelski » Sat Jun 03, 2006 12:15 am

It doesn't matter if the areas overlap. They can stay.

I am only talking about areas that are identical!
An area would be identical if all their coordinates are equal.

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 » Mon Jun 05, 2006 3:43 pm

This area of JFreeChart could do with some improvement, so suggestions are welcome. As long as we are careful about the layer order, entities that are completely covered by higher layer entities could be removed from the entity list. It could be a little tricky to get it right, but not impossible, and it would be a nice improvement.
David Gilbert
JFreeChart Project Leader

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

pelski
Posts: 16
Joined: Thu Feb 23, 2006 2:02 am

patch submitted

Post by pelski » Fri Jun 09, 2006 3:16 am

I have submitted a zip with a first go at this.

http://sourceforge.net/tracker/index.ph ... tid=315494

Areas with the same coords will be removed from map element.

Locked