Skip to main content
100%

Fork of API Heatmap - brand colors round 20 steps

✓ Published0🌍 Public
MMark Lam
Last edited Dec 2, 2021
Created on Dec 1, 2021

A responsive SVG heatmap displays companies from the GME-20 dataset, each rendered as a colored square labeled with a ticker symbol and a relative score. A three-stop linear color scale (`d3.scaleLinear`) transitions from light gray through teal to dark green, with continuous values rounded to the nearest 0.5 via `Math.ceil`, producing 50 discrete bins. Tooltips show company details on mouseover. The code imports specific functions from D3 v7, including `json`, `scaleLinear`, and `format`, and uses an API-hosted JSON file as the data source, positioning elements with a custom grid layout.

AI-generated description

The color uses a continuous color scale rounding to the nearest .2 resulting 50 bins.

The color scale is a 3 color gradient with 5 being gray, allowing for a smoother transition.

MIT Licensed

Similar vizzes