D3.js, “this”, and TypeScript
D3.js is a super cool and very powerful library for creating some really interesting visualizations. One of the problems that I ran into recently was regarding the “this” keyword in D3 functions. For example, in regular old javascript you would do: Which is fine. “this” is scoped to the function, so it would point back … [Read more…]