Maps using JFreeChart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
reji

Maps using JFreeChart

Post by reji » Wed Oct 09, 2002 1:34 am

Hi all,

I would like to know is there any way to create a Map like this [ check the URL given below ] using JFreeChart or any Java libraries ? There will be thousands of small components varying size and color. And I have to display customized tooltips on each components..

http://www.rejimani.com/images/tmap.jpg


Any guidelines available? Please help me...

Thanks,

reji mani from Korea

Dave Gilbert

Re: Maps using JFreeChart

Post by Dave Gilbert » Wed Oct 09, 2002 8:56 am

Hi Reji,

You *could* represent the data using an IntervalXYDataset and then write an XYBlockRenderer that draws the individual blocks. I can think of a couple of issues though:

- you'd have to do the layout when you constructed your dataset;
- with thousands of blocks, the current tool tip implementation might start to sag (this is a problem for regular chart types too, though).

If I understand the picture though, your data is really one-dimensional. The two-dimensional layout is just to fit everything on the screen. So a custom component might make more sense.

Regards,

DG.

GreGie

Re: Maps using JFreeChart

Post by GreGie » Fri Oct 11, 2002 1:43 pm

Hi Reji,

I had a bit of success using GeoTools (.org). It is not exactly what you want, maybe, but have a look. You can catch the map highlight event and add some information to it. However, you probably would have to implement some facility to turn your map into a real geomap, which might not be worth it.

Greetings,
GreGie

reji

Re: Maps using JFreeChart

Post by reji » Fri Oct 18, 2002 11:27 am

Hi,

Thanks for the suggestions.. I have accomplished the target by using graphis components and XYLayout.. But not an optimal solution..

http://www.rejimani.com/images/tablemap.jpg

regards,

reji

Locked