Preferred way to create HTML in a Component

What is the preferred way for creating markup in a Component? The Component accepts, as part of its interface, a JSON object used to construct a d3-based graph. Currently, when hovering over an node in the graph, I am constructing a simple tooltip using string concatenation. Is there a better way to do this?