Mathias
Mathias

Reputation: 19

How to draw a 3d bar chart on a world map with d3.js?

I would like to make this kind of geolocated 3d bar chart

d3.js can deal with 3d map projections

Is there a way to project a bar on a given coordinate to get a result similar to kartograph ?

Upvotes: 1

Views: 5532

Answers (1)

Elijah
Elijah

Reputation: 4639

Any projected data in D3 can have bars placed on them with the xy of the rect being at a latlong point. Here's an example with D3's satellite projection:

http://bl.ocks.org/4531633

To match the style of the Kartograph example, you'd need to rotate the rect in relation to the projection of the point it's associated with, as well as playing with opacity.

Upvotes: 1

Related Questions