Example of TnT Genome that colors genes based on their biotypes and creates a legend dynamically explaining the colors of the biotypes in the display. This is done by getting the default data retriever (which is a promise) and set a new retriever that chains the original one with a function that sets colors to the genes and populates the legend.
Modified http://d3js.org/d3.v3.min.js to a secure url
Modified http://tntvis.github.io/tnt.genome/build/tnt.genome.min.js to a secure url
https://d3js.org/d3.v3.min.js
https://tntvis.github.io/tnt.genome/build/tnt.genome.min.js