Skip to content

Instantly share code, notes, and snippets.

View statsracecarstats's full-sized avatar


View GitHub Profile
statsracecarstats /
Last active September 1, 2018 02:04
Bar graph with constant gradient using D3

This script is an example of how to create a constant gradient across multiple svg objects, such as bars in a bar graph. Based off an example by Mike Bobstock, modified to extend across multiple bars.

Data presented in example are various meltal's melting points. Data collected from: The Engineering ToolBox, 'Metals - Melting Temperatures', Collected August 25th, 2018.