An example of how to create your own sparkline dirctive in AngularJS using replace and transclude
replace
transclude
This is a code excerpt from the book D3 on Angular. http://leanpub.com/d3angularjs