Heatmap with a legend
enableLegend: true puts a color bar underneath the grid that maps the colors of the
cells onto the values they stand for. The bar shows the same discrete color buckets that the grid uses, and
legend.title and legend.tickFormat label it. The legend takes its height out of the
configured one, so the visualization as a whole still measures 1000 × 600 pixels.
Toggle legend rebuilds the heatmap with the legend off, which shows how much room it takes, and
Export SVG downloads the heatmap as an SVG file with the same legend underneath it.
Source