This post describes how to build a very basic hexbin chart with d3.js. The hexbin chart is a representation of a 2d density. It is made thanks to the d3-contour plugin. Visit data-to-viz.com for more theoretical info on 2d density charts. This example works with d3.js v4
and v6
div
that will be modified by d3 later on. It also load the d3-hexbin pluginx
and y
. A 2d density plot basically represents the amount of data point on each part of the grid.d3.hexbin()
. You can control the hexbin size with the radius()
argument..hexagon()