Skip to content

Instantly share code, notes, and snippets.

@biovisualize
Last active February 16, 2017 04:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biovisualize/25064485ba8744f5063e6905b837fac5 to your computer and use it in GitHub Desktop.
Save biovisualize/25064485ba8744f5063e6905b837fac5 to your computer and use it in GitHub Desktop.
Template example
var containerNode = config.parent.querySelector('.chart-container')
if(!containerNode) {
var template = '<div class=”chart-container”>'
+ '<svg class=”datahub-chart”>'
+ '<g class=”panel”>'
+ '<g class=”stripe-group”></g>'
+ '<g class=”bar-group”></g>'
+ '<g class=”y axis”></g>'
+ '<g class=”x axis”></g>'
+ '<g class=”title-container”>'
+ '<text class=”y axis-title”></text>'
+ '<text class=”x axis-title”></text>'
+ '<text class=”chart-title”></text>'
+ '</g>'
+ '<g class=”message-group”></g>'
+ '<g class=”events”><rect class=”event-panel”></rect></g>'
+ '</g>'
+ '</svg>'
+ '</div>'
containerNode = utils.appendHtmlToNode(template, config.parent)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment