This post follows the previous one on basic heatmaps. It shows how to custom the heatmap: a special care is given to axis, hover effect is added to cells and a better color scale is set up.
div
that will be modified by d3 later on.svg
area. It specify the chart size and its margin. Read more.scaleBand()
is used, which allows to control the size of each square using the padding property
. If padding is close from 1, square are very small. (0 for very big)rect
element.