Dynamically updatable color bars for use with d3.js