how to draw multiple circles at the same (lat,long) ?

32 views
Skip to first unread message

pradeep arumalla

unread,
Oct 25, 2016, 1:13:02 PM10/25/16
to d3-js
Hi there , I have a situation where I have to draw small circles at a particular (latitude,longitude), but I have them overlapping each other, and the last circle is only seen, and the others get hidden below the last one, is there an example I can see somewhere, please advice

Thanks
Pradeep

Curran

unread,
Oct 26, 2016, 9:15:53 AM10/26/16
to d3-js
Hi Pradeep,

One thing you could try is to make the circles semi-transparent, by setting the fill-opacity attribute on the circles to a value between 0 and 1, say 0.5. That way, the points with many overlapping circles will appear darker. I used this approach in a map example Migrant Deaths over Time. It's not perfect, though, because after a certain number of overlapping circles you can't tell if more are added.

Another approach would be to count the number of circles that overlap at a particular location, then draw a bigger circle representing all of them, sized proportionately to the count.

Best regards,
Curran

Frank Guerino

unread,
Oct 26, 2016, 9:32:30 AM10/26/16
to d3...@googlegroups.com
Another option is to use a Force Directed Graph.  This will get the circles to "cluster" around a charting point (Latitude, Longitude).  Think of it as a different set of clustered Bubble Charts at every charting point, on the map.

My Best,

Frank


--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages