Skip to content

Instantly share code, notes, and snippets.

@heyjinkim
Last active December 19, 2015 16:08
Show Gist options
  • Save heyjinkim/5981160 to your computer and use it in GitHub Desktop.
Save heyjinkim/5981160 to your computer and use it in GitHub Desktop.
SVG element in Handlebars template for a bar-chart.
<script type="text/x-handlebars" data-template-name="application">
{{bar-chart width=960 height=500}}
</script>
<script type="text/x-handlebars" id="components/bar-chart">
<g {{bindAttr transform=transformG}}>
<g class="x axis" {{bindAttr transform=transformX}}></g>
<g class="y axis"><text transform="rotate(-90)" y="6" dy=".71em" style="text-anchor:end;">Frequency</text></g>
<g class="rects"></g>
</g>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment