Indeed the thermometer.ts you're refering to seems pretty much siimilar to an old deprecated version found on
https://gist.github.com/spatney/4eb52930075a5e5be9af
and was basically used in an early DevTool Deprecated demo video.
I did manage to easily refactor the thermometer.ts code to Power BI Visuals CLI v1.1.0 a while ago.
Basically code was completely refactored, first by using constructor method instead of init.
Also for SoC convinience... everything that deals with dataRole, dataViewMappings, object...
definition was no longer defined in main thermometer.ts file using
public static capabilities: VisualCapabilities
but in separate capabilities.json
D3.Selection definitions also had to be refactored with d3.selection<SVGElement> and so on...
I'll see if I could put the demo back on Github...